Link to home
Start Free TrialLog in
Avatar of MHPC
MHPCFlag for United States of America

asked on

Reporting Service - How to do a sub report without Subreport

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

ASKER CERTIFIED SOLUTION
Avatar of Yurich
Yurich
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

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.