Exporting from Millennium to a Comma Separated File Format

Total Page:16

File Type:pdf, Size:1020Kb

Exporting from Millennium to a Comma Separated File Format

Exporting From Millennium To A Comma Separated File (.CSV) Format

Suggested Best Practices

Exporting Millennium data into a comma-separated file through custom Crystal Reports can be difficult. Business Objects Crystal XI includes a Character Separated export option that has limited functionality within applications that utilize Crystal as their reporting tool. Business Objects has acknowledged these limitations and has published it’s own knowledge base article. You can read this knowledge base article by going to www.businessobjects then Support and search for article c2014451. MPAY has utilized some workarounds in the reports as described below.

As a general rule of thumb we suggest you create one text formula each for headers, detail and trailer records. Append each of the individual fields with a ‘,’ separator and export as a character separated file rather than a csv. You can still use the csv extension.

Symptom Solution Column Headers are repeating on Make sure this registry key exists. each line and appending to the detail HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\Export\CSV data. AreaExportOptions = 1

CO,ID,Lname,Amount, CO,ID,Lname,Amount, CO,ID,Lname,Amount, CO,ID,Lname,Amount, CO,ID,Lname,Amount,123,000453,Frump,100.00 CO,ID,Lname,Amount, CO,ID,Lname,Amount, CO,ID,Lname,Amount, CO,ID,Lname,Amount,

This will correct the header appending to the detail issue. You will also have to move the header row out of the report header section and place it in a group header section. Column Headers are repeating over Column Headers work best if placed in a group header. In cases where the export file has only each detail line. one header row the obvious section to place the header row would be the report header section. Unfortunately Crystal XI will repeat this line over each detail line instead of once for the CO,ID,Lname,Amount whole file. The best solution for this issue is to create a SQL expression such as MPAY Export 123,000453,Frump,100.00 CO,ID,Lname,Amount Wrapper and populate this with the literal ‘A’. Then use this as your first or highest group 123,000454,Brown,200.00 level and add the header row there as depicted below. CO,ID,Lname,Amount 123,000455,Gizmo,500.00

Group footers are appending to the Some exports require trailer records. These are usually placed either in the report footer last detail record in each group. section or in a group footer. If the detail row in the report is one formula then it is easier to correct this issue. CO,ID,Lname,Amount In the detail formula you will need to add logic to determine if the current line is the last detail 123,000453,Frump,100.00 123,000454,Brown,200.00 line for the group or the report. If it is then you simply add a carriage return and line feed to 123,000455,Gizmo,500.00,sub total, 3 the detail row. In this example we are grouping the report on the Plan Id formula. The detail row is built in the string variable orec. If the next Plan Id is not equal to the current Plan Id or the next record is null meaning we are at the end of the data, then append a carriage return (chr(13)) and line feed (chr(10)) to the detail line prior to printing. orec := {@Plan Id} + "," + {Einfo.id} + "," + totext(Sum({Report_MPI_EnhancedDetails_NoDropOrDD_V001.amount}+ ',' + {@FullName} + ',' + totext({Report_MPI_401kByProcess_V001.checkDate},'MM/dd/yyyy'); if Next ({@Plan Id}) <> {@Plan Id} or NextIsNull ({EInfo.id}) then orec := orec + chr(13)+ chr(10) else orec;

Recommended publications