Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Sub reports Post Reply Post New Topic
Author Message
malraff
Newbie
Newbie


Joined: 26 Aug 2010
Online Status: Offline
Posts: 7
Quote malraff Replybullet Topic: Sub reports
    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?

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
shanth
Groupie
Groupie


Joined: 06 Aug 2012
Location: United States
Online Status: Offline
Posts: 75
Quote shanth Replybullet 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..
IP IP Logged
malraff
Newbie
Newbie


Joined: 26 Aug 2010
Online Status: Offline
Posts: 7
Quote malraff Replybullet 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
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 16 Oct 2012 at 6:08am
That's odd... It shouldn't make a difference.  Which version of Crystal are you using?
 
-Dell


Edited by hilfy - 16 Oct 2012 at 6:09am
IP IP Logged
malraff
Newbie
Newbie


Joined: 26 Aug 2010
Online Status: Offline
Posts: 7
Quote malraff Replybullet Posted: 16 Oct 2012 at 6:10am
thats what i thought - version 11
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.