Good Day:
If you make it a report that goes to the Sys-Monitor, then >> run
report >> do preview in Sys.Monitor >> in upper left corner, do Export.
.csv is not listed, but other text types are. There is also a "....
Data only" that might work. It 'flatens' the output.
Leonard C. Hartka, IT Director\ERP Manager
Sun Automation Group
66 Loveton Circle
Sparks, Md. 21152
410-329-3560 ext. 120
410-329-3564 FAX
443-255-7192 Work Cell
len.hartka@...
Baq-text baq-txt
________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Len Hartka
Sent: Friday, April 06, 2012 6:40 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Exporting BAQ results to a CSV file
Good Day:
Run the BAQ >> Right click in the grid- pick "Copy to Excell" >> do
"Save as" and change the file type at the bottom to csv.
Excell has a 64,000 record limit unless it is Excell 2010.
I was not sure how automated you wanted it.
Leonard C. Hartka, IT Director\ERP Manager
Sun Automation Group
66 Loveton Circle
Sparks, Md. 21152
410-329-3560 ext. 120
410-329-3564 FAX
443-255-7192 Work Cell
len.hartka@... <mailto:len.hartka%40sunautomation.com>
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of villalob
Sent: Friday, April 06, 2012 11:34 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Exporting BAQ results to a CSV file
Here is a working example of exporting to a csv file
Private Sub CallDynamicQueryAdapterExportMethod()
Try
' Declare and Initialize EpiDataView Variables
' Declare and create an instance of the Adapter.
Dim adapterDynamicQuery As DynamicQueryAdapter = New
DynamicQueryAdapter(Me.oTrans)
adapterDynamicQuery.BOConnect
' Declare and Initialize Variables
dim strBAQName as string
Dim result As Boolean
Dim pbSuccess As System.Boolean
strBAQName = "EPIC03-jdvTest9"
' Get the ID of BAQ that you wish to work with
adapterDynamicQuery.GetQueryByID(strBAQName)
result = adapterDynamicQuery.Export(adapterDynamicQuery.RuntimeQuery,
"c:\temp\test", "csv", ",", false, pbSuccess)
' Cleanup Adapter Reference
adapterDynamicQuery.Dispose
Catch ex As System.Exception
ExceptionBox.Show(ex)
End Try
End Sub
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"jeffery_p_sanders" <jps@...> wrote:
"jeffery_p_sanders" <jps@> wrote:
"jckinneman" <jckinneman@> wrote:
to figure out how they work. In these cases I fall back on that Epicor
objects are all based on standard .net objects and standard
tools/approaches usually work. Since plagiarism (not in its true sense
of the word) is the best form of programming, here is a link that shows
how to export a dataset to csv.
http://geekswithblogs.net/cubeberg/articles/78814.aspx
, "jeffery_p_sanders" <jps@> wrote:
ideas?
confidential information. If you are not the intended recipient, please
notify the sender immediately by reply e-mail or at 410-472-2900 and
then delete the message without using, disseminating, or copying this
message or any portion thereof. With e-mail communications you are urged
to protect against viruses.
[Non-text portions of this message have been removed]
This e-mail and any attachments may contain proprietary and/or confidential information. If you are not the intended recipient, please notify the sender immediately by reply e-mail or at 410-472-2900 and then delete the message without using, disseminating, or copying this message or any portion thereof. With e-mail communications you are urged to protect against viruses.
[Non-text portions of this message have been removed]
If you make it a report that goes to the Sys-Monitor, then >> run
report >> do preview in Sys.Monitor >> in upper left corner, do Export.
.csv is not listed, but other text types are. There is also a "....
Data only" that might work. It 'flatens' the output.
Leonard C. Hartka, IT Director\ERP Manager
Sun Automation Group
66 Loveton Circle
Sparks, Md. 21152
410-329-3560 ext. 120
410-329-3564 FAX
443-255-7192 Work Cell
len.hartka@...
Baq-text baq-txt
________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Len Hartka
Sent: Friday, April 06, 2012 6:40 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Exporting BAQ results to a CSV file
Good Day:
Run the BAQ >> Right click in the grid- pick "Copy to Excell" >> do
"Save as" and change the file type at the bottom to csv.
Excell has a 64,000 record limit unless it is Excell 2010.
I was not sure how automated you wanted it.
Leonard C. Hartka, IT Director\ERP Manager
Sun Automation Group
66 Loveton Circle
Sparks, Md. 21152
410-329-3560 ext. 120
410-329-3564 FAX
443-255-7192 Work Cell
len.hartka@... <mailto:len.hartka%40sunautomation.com>
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of villalob
Sent: Friday, April 06, 2012 11:34 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Exporting BAQ results to a CSV file
Here is a working example of exporting to a csv file
Private Sub CallDynamicQueryAdapterExportMethod()
Try
' Declare and Initialize EpiDataView Variables
' Declare and create an instance of the Adapter.
Dim adapterDynamicQuery As DynamicQueryAdapter = New
DynamicQueryAdapter(Me.oTrans)
adapterDynamicQuery.BOConnect
' Declare and Initialize Variables
dim strBAQName as string
Dim result As Boolean
Dim pbSuccess As System.Boolean
strBAQName = "EPIC03-jdvTest9"
' Get the ID of BAQ that you wish to work with
adapterDynamicQuery.GetQueryByID(strBAQName)
result = adapterDynamicQuery.Export(adapterDynamicQuery.RuntimeQuery,
"c:\temp\test", "csv", ",", false, pbSuccess)
' Cleanup Adapter Reference
adapterDynamicQuery.Dispose
Catch ex As System.Exception
ExceptionBox.Show(ex)
End Try
End Sub
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"jeffery_p_sanders" <jps@...> wrote:
><mailto:vantage%40yahoogroups.com> ,
> Never mind. I found it:
>
> Dim sw As New System.IO.StreamWriter(sOutputFile, False)
>
> Jeff Sanders
>
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
"jeffery_p_sanders" <jps@> wrote:
> ><mailto:vantage%40yahoogroups.com> ,
> > What code do I use in place of the StreamWriter? (not recognized)
> >
> > Jeff Sanders
> >
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
"jckinneman" <jckinneman@> wrote:
> > >some that just plain don't work or I don't/won't/haven't taken the time
> > > Since some of these BO don't get a lot of use I have come across
to figure out how they work. In these cases I fall back on that Epicor
objects are all based on standard .net objects and standard
tools/approaches usually work. Since plagiarism (not in its true sense
of the word) is the best form of programming, here is a link that shows
how to export a dataset to csv.
http://geekswithblogs.net/cubeberg/articles/78814.aspx
> > ><mailto:vantage%40yahoogroups.com>
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
, "jeffery_p_sanders" <jps@> wrote:
> > > >BAQ's QueryResults to a CSV file. I get the error "Query not found". Any
> > > > I thought this would be the easy part. I was wrong.
> > > >
> > > > As you can see in the code below, I am trying to export the
ideas?
> > > >the asterisks.
> > > > Top part of code is there for reference...The export is between
> > > >DynamicQueryAdapter(UD35Form)
> > > > Dim startDate as Date = epiDateTimeEditorC1.Value
> > > > Dim endDate as Date = epiDateTimeEditorC2.Value
> > > > Dim baqID as string = "DTSF-FilteredWeeklyTimeExport"
> > > > Dim DQadpt as DynamicqueryAdapter = New
> > > > DQadpt.BOConnect()DQadpt.GetQueryExecutionParametersByID(baqID)
> > > > Dim topNRecords as int32 = 100000
> > > > Dim hasMoreRecords as boolean = True
> > > > Dim resultFieldList as string = ""
> > > > Dim execSet as Epicor.Mfg.Bo.QueryExecutionDataSet =
> > > > Dim targetRow as DataRowtopNRecords, hasMoreRecords)
> > > > Dim tbl as DataTable = execSet.Tables("ExecutionParameter")
> > > > targetRow = execSet.Tables("ExecutionParameter").NewRow()
> > > > targetRow("ParameterName") = "FirstDate"
> > > > targetRow("ParameterValue") = startDate
> > > > targetRow("ValueType") = "Date"
> > > > targetRow("IsEmpty") = False
> > > > targetRow("RowIdent") = "A"
> > > > tbl.Rows.Add(targetRow)
> > > > targetRow = execSet.Tables("ExecutionParameter").NewRow()
> > > > targetRow("ParameterName") = "LastDate"
> > > > targetRow("ParameterValue") = endDate
> > > > targetRow("ValueType") = "Date"
> > > > targetRow("IsEmpty") = False
> > > > targetRow("RowIdent") = "A"
> > > > tbl.Rows.Add(targetRow)
> > > >
> > > > DQadpt.ExecuteByIDParametrized(baqID, execSet, resultFieldList,
> > > >DQadpt.QueryResults
> > > > 'All code above works
> > > >
> > > > '*****************************************
> > > >
> > > > 'Export code
> > > > 'The records I want to export are now found in
> > > >pcFileType, pcTextDelim, pbOutputLabels, pbSuccess)
> > > > dim ds as QueryDesignDataSet = DQadpt.QueryDesignData
> > > > dim pcFile as string = "C:\Test.CSV"
> > > > dim pcFileType as string = "CSV"
> > > > dim pcTextDelim as string = ","
> > > > dim pbOutputLabels as boolean = False
> > > > dim pbSuccess as boolean
> > > >
> > > > Dim fileExported As Boolean = DQadpt.Export(ds, pcFile,
> > > >This e-mail and any attachments may contain proprietary and/or
> > > > '*********************************************
> > > > DQadpt.Dispose()
> > > >
> > > >
> > > > Jeff Sanders
> > > >
> > >
> >
>
confidential information. If you are not the intended recipient, please
notify the sender immediately by reply e-mail or at 410-472-2900 and
then delete the message without using, disseminating, or copying this
message or any portion thereof. With e-mail communications you are urged
to protect against viruses.
[Non-text portions of this message have been removed]
This e-mail and any attachments may contain proprietary and/or confidential information. If you are not the intended recipient, please notify the sender immediately by reply e-mail or at 410-472-2900 and then delete the message without using, disseminating, or copying this message or any portion thereof. With e-mail communications you are urged to protect against viruses.
[Non-text portions of this message have been removed]