Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to sub reports

Status
Not open for further replies.
Jul 19, 2003
132
NZ
I'm working on a report that has several one to many relationships. For each customer I need to have several sections and within each section are several transactions/items of that transaction type.

The usual way of doing this would be a main report containing several sub reports, however they want to be able to export to Excel and MRS doesn't export subreports to Excel.

The alternative would be to do it as one select and min or max on the duplicated rows but I think I'll come unstuck with this due to the complexity of the data.

Can anyone suggest alternatives? The Business want a printable report with the option of exporting it to Excel (to tinker with) or pdf.

Thanks.
 
The export function will export all content on the report to excel including subreports. At the time of exporting the content is rendered and it doesn't care really where it came from.




____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
Have you tried it?

You get a blank area in the Excel version of the report containing the following text "Subreports within table/matrix cells are ignored".

I asked on the forum some time ago and was told there was no way around this.
 
I knew it did but to make sure did it before I posted.

Created a report1.rdl
dataset based on a query "select itemid from itemmaster"

Created a report2.rdl
dataset based on a query "select upc from itemmaster"

Added report2.rdl to report1.rdl as a subreport

Deployed it. Ran it. Clicked the export format --> Excel --> Exported and got all the content.

SSRS 2005
Excel 2003
and I tried PDF also with success.

I've done this in Excel 2002 also in the past. I had a series of reports I wrote for a training session that was basically a dashboard. all the charts and matrix areas were subreports. This also exported fine into excel and pdf.

The point is the content is rendered. When you view the source of the report after it is done you will see the static html it has rendered to the browser. The export feature only takes this to use.

There must be some other variables in your process or it is a issue with your config that is not allowing this. I don't recall a setting for export and subreports but I can check. msdn has a listing of all the xml tags. You should start there


____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
I think I've found an answer, if I embed the sub report within a rectangle rather than within a table it exports ok.

The trouble with this is that it will be fiddly to format the parent information (customer) as I'll need to make loose textbox objects look like a table.
 
Aside from all that. the best alternative I can come up with is to create the reports in a ASP.NET page. Then you do the exporting. But that is messy and not an easy solution


____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top