I have a form created that allows users to pull data up into a Janus gridex through the use of a query. I also allow the users to export the data from the query to a crystal report. My problem is as follows: there is an extra column that I have added in that appears after the query is run. The users are then able to add data into this column. When they press the save button, the data is saved into an array. What I want to do is include the extra column that is added in, but not included in the query and have it export into excel.
Here is my code for exporting the query to excel (It exports out the crystal report to excel)
This exports out all of the columns, except for that extra one. Since the data is already included into an array, is it possible to add a couple of lines of code that will include the column and data into the excel export? Any help on this would be much appreciated. Thanks.
Brad![[spidey] [spidey] [spidey]](/data/assets/smilies/spidey.gif)
Here is my code for exporting the query to excel (It exports out the crystal report to excel)
Code:
strExportPath = "C:\" 'where excel will be exported to'
Set crxExportOptions = crxReport.ExportOptions
'Exports text boxes on the form to the excel report
crxReport.FormulaFields.Item(5).Text = Chr(34) & monumber & Chr(34)
crxReport.FormulaFields.Item(6).Text = Chr(34) & startdate & Chr(34)
crxReport.FormulaFields.Item(7).Text = Chr(34) & enddate & Chr(34)
crxReport.FormulaFields.Item(8).Text = Chr(34) & tosite & Chr(34)
crxReport.FormulaFields.Item(9).Text = Chr(34) & fromsite & Chr(34)
crxExportOptions.FormatType = crEFTExcel80
crxExportOptions.DestinationType = crEDTDiskFile
crxExportOptions.DiskFileName = strExportPath & "Exported.xls"
'Export the report without prompting the user
crxReport.Export False
This exports out all of the columns, except for that extra one. Since the data is already included into an array, is it possible to add a couple of lines of code that will include the column and data into the excel export? Any help on this would be much appreciated. Thanks.
Brad
![[spidey] [spidey] [spidey]](/data/assets/smilies/spidey.gif)