Solved

Reporting Service - How to do a sub report without Subreport

Posted on 2010-11-09
3
707 Views
Last Modified: 2012-05-10
Hello,
I have a simple report with subreports that takes a parameter from the main report. Everything works fine except when I print that sometimes it leaves a blank page. This is a known bug from Microsoft. http://support.microsoft.com/kb/938943
The workaround Microsoft suggest is
To work around this behavior, follow these steps:
1.Make sure that your report does not use the Subreport control.
2.Move the data in the subreport into the main report.

… and that’s where I am having problems. I can not figure out how to do the same thing I am doing without a subreport. Can you help me?

I have 3 db tables. Invoices, Activity and Invoice History.
Each invoice’s information (about 15 fields: Inv Number, Inv Date, Description, etc) shows in a new page together with the Activities (3 fields, 10-20 rows). Just like the activities, we show the last 20 records from the Invoice History (4 fields, 20 rows). Invoice History right now is another subreport that we pass the Invoice Number as a parameter (just like Activities).

This is what I have :
 (table in main report using Invoice Data and group by InvoiceNumber)
Invoice #  | Description | Date |Name |Address |Status|Amt Due|Credits| etc etc
--------------------------------------------------------------------------------------
1              | Paper       | 1/2 | RCastro|12 sw 12 st| Open|$12.50 |$-1.32 | etc etc

 Activities: (subreport) <- InvoiceNumber
-----------------------------------------------------

Desc      |  Date    | Charge
---------------------------------------
Move paper | 12/2      | $4.50
Check paper 12/4      | $6.50
Align paper 12/5     | $3.50

Invoice History: (subreport) <- InvoiceNumber
------------------------------------------------------

Date    | Amount Paid| Paid On
--------------------------------------------------------------------------------------
7/2      | $14.50           | 7/9
8/4      | $36.50           | 8/12
9/5     | $36.50            | 9/12
.
.
.
---------------------(new page)

Invoice #  | Description | Date |Name |Address |Status|Amt Due|Credits| etc etc
---------------------------------------------------------------------------------------------
2              | Pencil        | 1/3 | NLopez|132 NE 1st| Open|$32.40 |$-0.32 | etc etc

 Activities: (subreport) <- InvoiceNumber

---------------------------------------
Desc |  Date    | Charge
---------------------------------------
Pickup |  10/2      | $4.50
Delivery| 10/4      | $6.50
.
.
.
Invoice History: (subreport) <- InvoiceNumber
-----------------------------------------------------------

Date    | Amount Paid| Paid On
---------------------------------------
7/2      | $14.50           | 7/9
8/4      | $36.50           | 8/12
9/5     | $36.50            | 9/12
7/2      | $14.50           | 7/9
8/4      | $36.50           | 8/12
9/5     | $36.50            | 9/12

---------------------------------------(new page)
Etc etc.


Thanks Again.
Damian

0
Comment
Question by:MHPC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21

Accepted Solution

by:
Yurich earned 500 total points
ID: 34114651
Hello,

Unfortunately, in your particular case there seems to be no way of doing it without a sub-report. The reason is very simple. Combination of invoice activities and invoice history will produce progressive duplicates (i.e. 9 records for your invoice #1) and you won't be able to extract your data as you want to :(

You can get away with having no sub-report if you only had either activities or history on your main report, but not two together.

Now, what you can possibly do. According to MS description, the whole problem exists because of the "Keep Together" property of your sub-report set on. You can try disabling it and check if it's going to fix your problem. I wouldn't be 100% sure it will work as MS RS can be quite often not consistent.

Another work around I can suggest (which is not perfect, but will work) is to have three reports with your invoice data in one and two links to other reports. If you have links, it will work fine (but of course it will not get printed on the same page). If you must have your invoice details along with your activities and/or history, you can have invoice details on your subsequent reports along with activities and history (but not on the same report).

Can't think of anything else at the moment.
Good luck
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34770146
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question