Out of memory exception thrown - I tried to export a large record from report viewer into excel in windows forms. I have applied grouping for page breaks since excel does not allow above 65535 rows. Below expression is used for Group On expression,
=Int((RowNumber(Nothing))/10000)
Page Break at end Checkbox is enabled for this grouping
while exporting by clicking on the default export option available in report viewer control. But results in out of memory exception thrown.
Am i doing right? is there any solution or work around for this?
Thanks in advance,
I would instead add column to dataset for your "page_grouping_number" and populate it based on number of records in your dataset and only if the export option selected is Excel.
Then, add this column to your report data source definition and add row group by that column (with page break option enabled). This should push each page into new sheet of Excel file.
More information on pagination is here.
Also, this question is similar to yours and answers may have some useful info.