locked
subreport does not Export to Excel RRS feed

  • Question

  • Hello,
    I've seen many posts all around the Internet saying that this isn't possible in RS2000 or 2005, but I just wanted to get some clarification.  Here is what I'm trying to do.

    I have a report that requires a "sub report" type functionality to it (eg. one to many relationship) for display purposes.  The main report consists of some textboxes at the top for a report header and then a table which houses the "parent" information.  What I'd like to do is to then have a sub report display data for each of these "parents".  The best thing would be to just place a subreport control into a column in the table, and that looks great when just rendering online or to pdf.  However, I need to export to Excel, which this doesn't support.  I've gotten several errors along the way (Subreports within table/matrix cells are ignored - solved by putting the sub report into a rectangle within the table as well as
    • Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index).

    I'm fairly certain that this was solved in SQL2008/SSRS2008, but I don't have the luxury of going to that at this time.  I'm currently running SQL2005 w/ RS2000. 

    I did try putting the subreport into a list container, but that didn't seem to work for me nor did I look very nice.  I'm very open to suggestions if anyone has any ideas.

    Do I have any other ways to make this work for me, or am I S.O.L.?

    Thanks so much in advance!

    jamey8420

    Thursday, January 7, 2010 9:46 PM

Answers

  • When I ran across this issue with 2005 I had to "recreate" the subreport in my actual report.  But thankfully you can reuse some of your stored procedures/SQL.  I know this is a pain but it is probably your only workaround that I can think of.  The advantage to doing it this way is that you have a tad bit more flexibility with how the "sub report" actually looks in your "parent" report.

    Hope this helps,
    --Josh
    Josh George LiveLogic, LLC
    Thursday, January 7, 2010 10:42 PM
  • I think the difficult part when you are using subreport inside list would be to remove the merged cells that are created in Excel by the renderer. I think if you take care of this, it shouldnt look that bad either. Try arranging the data related to the parent in a table region inside the list. The details for each parent will be shown in the subreport anyways. This way you could make the exported excel look better.

    Other option would be to try to avoid using the subreport and try to fetch all the details in one dataset itself and arrange the data using tables.

    Regards
    Manoj
    Friday, January 8, 2010 6:55 AM

All replies

  • When I ran across this issue with 2005 I had to "recreate" the subreport in my actual report.  But thankfully you can reuse some of your stored procedures/SQL.  I know this is a pain but it is probably your only workaround that I can think of.  The advantage to doing it this way is that you have a tad bit more flexibility with how the "sub report" actually looks in your "parent" report.

    Hope this helps,
    --Josh
    Josh George LiveLogic, LLC
    Thursday, January 7, 2010 10:42 PM
  • I think the difficult part when you are using subreport inside list would be to remove the merged cells that are created in Excel by the renderer. I think if you take care of this, it shouldnt look that bad either. Try arranging the data related to the parent in a table region inside the list. The details for each parent will be shown in the subreport anyways. This way you could make the exported excel look better.

    Other option would be to try to avoid using the subreport and try to fetch all the details in one dataset itself and arrange the data using tables.

    Regards
    Manoj
    Friday, January 8, 2010 6:55 AM
  • to export Main report with subreports to excel In SQL 2005, you must put in cell of your table a rectangle, in this one put the subreport.

    that's work!! :)
    Tuesday, February 23, 2010 9:48 AM