Creating CSV from DataTable with Headers

We are currently evaluating your product, and need to be able to produce a CSV file with columns of data that starts with Column Headers. All of this needs to be in code, not in the designer.

Our setup is as follows:

DataTable with columns and rows (both of while fluctuate depending on user settings)
Report.RegisterData(DataTable)
Enable DataSource

Add a ReportPage
Create DataBand, where the DataSource is Report.GetDataSource([DataTable name])
ReportPage.Bands.Add(DataBand);

Add TextObjects for each column.

We get all the data, but no headers. And I've tried several ways to add headers that haven't been successful.

Comments

  • FASTrpt (Brilogy)FASTrpt (Brilogy) United States (California)
    edited 8:33AM
    please note that the data band only provides data, which sounds like what you are getting. we have done this by first unioning in the header text in the sql view or stored procedure and then using that 'complete' result set. I note that if you do union your data and header, that your datatypes need to match, i.e., all string. lastly, I note that while FR is an awesome report writer, it is not really a I/O generator, as such while it can be done, outputting a CSV is not a core strength of this product.
  • FASTrpt wrote: »
    please note that the data band only provides data, which sounds like what you are getting. we have done this by first unioning in the header text in the sql view or stored procedure and then using that 'complete' result set. I note that if you do union your data and header, that your datatypes need to match, i.e., all string. lastly, I note that while FR is an awesome report writer, it is not really a I/O generator, as such while it can be done, outputting a CSV is not a core strength of this product.

    The only thing that we need is the headers to print. And the data is coming from an DataTable, and it's not printing any headers right now. Is there a way to turn on the headers from the column names?
  • We have been able to get some test data to show a column header, using a DataHeaderBand set to the DataBand.Header. But, in our actual application, the header text doesn't display.
  • edited 8:33AM
    We have been able to get some test data to show a column header.






    __________________
    WoW Gold| D3 Gold| RS Gold| Swtor Credits

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.