Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Reporting Service - How to do a sub report without Subreport

Posted on 2010-11-09
3
Medium Priority
?
712 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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