Solved

Reporting Service - How to do a sub report without Subreport

Posted on 2010-11-09
3
663 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
3 Comments
 
LVL 21

Accepted Solution

by:
Yurich earned 500 total points
Comment Utility
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 100

Expert Comment

by:mlmcc
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now