For Custom BAQ Reports there is a file in this Groups Files section under Epicor 9 Crystal Reports that explains how to pass parameters to BAQ Crystal Reports. It is in C# but can be easily changed to VB if you are on 8. Basically you write the information, in this case the Job Number, to an XML file, call the BAQ report, the BAQ report form load event reads the file and populates the information on the BAQ screen. At this point the user runs the report either via the preview or print button without having to hand enter the job number. If you like you can either hide the control or make it disabled so the user can not change it.
If you want to run a report without any user intervention that will take a bit more coding. Somehow you have to get the data that the BAQ normally gets, then feed that data to the crystal Report. If you are on 9, you can use the dynamic query BO to run the BAQ and take the output and feed it to a crystal report. Once you figure out how to call the dynamic query bo, the rest is textbook Crystal Report calls and all can be done from within Epicor Customization. If you are on 8, you may have noticed from other messages that we haven't figured out how to call the dynamic query BO.
Jim Kinneman
Senior Consultant
Encompass Solutions, Inc
If you want to run a report without any user intervention that will take a bit more coding. Somehow you have to get the data that the BAQ normally gets, then feed that data to the crystal Report. If you are on 9, you can use the dynamic query BO to run the BAQ and take the output and feed it to a crystal report. Once you figure out how to call the dynamic query bo, the rest is textbook Crystal Report calls and all can be done from within Epicor Customization. If you are on 8, you may have noticed from other messages that we haven't figured out how to call the dynamic query BO.
Jim Kinneman
Senior Consultant
Encompass Solutions, Inc
--- In vantage@yahoogroups.com, "scottinct78" <spare@...> wrote:
>
> I have a button on my Job Closing form that calls a BAQ. This part works fine. But it would be relay cool if there was a way to populate the the BAQ with the job number from the job closing window? It would be relay cool if it would run the report as well. Any ideas?
>
> Below is the code I have added to script editor. The Process call seemed to work until I put in the second arg (**jobnum**). I tried to use the lfo var but I could not get the value from the jobnum.text field to populate correctly.
>
>
>
>
> Private Sub JobClosingForm_Load(ByVal sender As object, ByVal args As EventArgs) Handles JobClosingForm.Load
> '//
> '// Add Event Handler Code
> '//
>
> btnLaunchTracker = CType(csm.GetNativeControlReference("f60ff150-3f38-4f4e-9d3e-7991e22a289e"), EpiButton)
> btnLaunchTracker.Enabled = True
>
> End Sub
>
> Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As EventArgs ) Handles btnLaunchTracker.Click
> Dim lfo as LaunchFormOptions = New LaunchFormOptions()
> lfo.ismodal = False
> lfo.Suppressformsearch = True
> 'lfo.ValueIn = 712fe815-dbeb-499d-af5d-746c3bcfc884
>
> ProcessCaller.LaunchForm(JobClosingForm, "UD0212","******")
>
> End Sub
>