Print Page | Close Window

Sub reports

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17775
Printed Date: 05 May 2024 at 6:05am


Topic: Sub reports
Posted By: malraff
Subject: Sub reports
Date Posted: 16 Oct 2012 at 5:00am
hi

i have a report that i want to add a sub report to which will run with the primary report and return results based on the Sales order number in the primary report..

the sub report also contains a field called sales order number and is a standalone report that i have created - i have simply added a pre existing report as the sub report..

in the primary report i have linked the sub report by right clicking on the sub report box and selecting "Change sub report links" - here i have selected sales order from the primary and the corresponding sales order in the sub report - but the sub report returns nothing!?

if i manually pass a variable to the sub report it will run fine

any one any ideas?




Replies:
Posted By: hilfy
Date Posted: 16 Oct 2012 at 5:21am
I would try temporarily putting the parameter that contains the sales order number on your subreport so that you can see what's being passed in.  Is the number from the main report in the same format that the data in the subreport is expecting?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: shanth
Date Posted: 16 Oct 2012 at 5:24am
Try adding formula in select expert in sub-report something like below:
{Table.Sales_order_number} = {?Pm-Table.Sales_order_number}

If not try:
change subreport links-> Uncheck select data in sub report based on field
and follow the first step..


Posted By: malraff
Date Posted: 16 Oct 2012 at 5:32am
hi dell

i tried putting the parameter in with the report - and guess what! it now works fine!!?

should that be the case?

mal


Posted By: hilfy
Date Posted: 16 Oct 2012 at 6:08am
That's odd... It shouldn't make a difference.  Which version of Crystal are you using?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: malraff
Date Posted: 16 Oct 2012 at 6:10am
thats what i thought - version 11



Print Page | Close Window