Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: CR XI Subreport Linking to SP Not Generating! Post Reply Post New Topic
Author Message
bainsteven
Newbie
Newbie
Avatar

Joined: 15 Mar 2012
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote bainsteven Replybullet Topic: CR XI Subreport Linking to SP Not Generating!
     Posted: 04 Apr 2012 at 12:38am
Hiya Guys,
 
I have a report which uses an SQL Stored Procedure as it's datasource (with parameters - as research suggests this improves performance).
 
Research also suggests that all parameters passed are in String format (type-conversion performed in SP).
 
This means that entering dates/multiple values/etc. is difficult for the end-user (as, for example, they are required to manually enter a date as "20120404" rather than being able to use the Calendar Picker/Date-Range functionality).
 
Research suggests that it is possible to get around this problem by embedding the SP report as a Subreport, and then linking the SP parameters to Formula Fields which are handled by the Main Report (meaning lists/date values/etc. can be generated and formatted before passing to the SP).
 
 
ISSUE:
 
As soon as I add a "Link" between my Main and Subreport - the Subreport REFUSES to generate (as, I believe, this is done during the "WhilePrintingRecords" - as if I drill-down into the Subreport it displays correctly!).
 
I have tried:
 
1)  Declaring a SHARED variable in the Subreport Footer (and everywhere else!) which calculates a GrandTotal - then passing it to the Main Report within a Formula Field (both fields are NOT suppressed).  This should force the records to be printed so the variable can be calculated?  Doesn't help.  I get "0" for the result (and still no Subreport);
 
2)  Adding a datasource to the Main Report and displaying a Data Field (to force database access).  Doesn't work.  The datasource is accessing the same database, but NOT the same SP (as it would ask for parameters - and therefore put me in the same situation!);
 
Has anyone ever come across this (incredibly ridiculous) limitation within Crystal?  I thought I was making progress (and all online documentation appears to point at this solution) - so what am I doing wrong?!  Confused
 
If anyone has any input it would be greatly appreciated!
 
Cheers,
 
Steve.
 


Edited by bainsteven - 04 Apr 2012 at 12:42am
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 04 Apr 2012 at 2:00am
Hi, I'm not sure why exactly it's doing that - I've done a similar sort of thing before and it worked fine.
 
Only thing I can suggest is place your subreport in the details section, I also had my parameter field as well as the formula field that converts the datetime value of the parameter to a string (the link to your subreport) in the (surpressed) report header.
 
Regards,
Ryan.
IP IP Logged
bainsteven
Newbie
Newbie
Avatar

Joined: 15 Mar 2012
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote bainsteven Replybullet Posted: 04 Apr 2012 at 3:15am
Hiya Ryan,
 
Thanks for the advice.
 
I can confirm that my Subreport is within the Main Report's Details section.
 
I have added all Parameter Fields (and related Formula Fields) into the Header sections of both the Main and Subreport... still no luck.
 
The login for the datasource doesn't even appear until I drill-down into the Subreport - and I can't find a way to force this.
 
I am currently running CR XI R2 RTM (11.5.0.313) on Windows 7 Enterprise.
 
I am looking into updating CR to SP6 manually (seen as though the "Check for Updates..." function returns nothing from the "Help" menu!).  I found these two useful websites:
 
Service Packs and Versions:
 
Update to CR XI R2A:
 
However, most links don't work - and the downloads that do, don't install!
 
Anywhere else I can update from RTM to SP6?!... I guess this is the first step?
 
Thanks for all your help,
 
Steve.
 


Edited by bainsteven - 04 Apr 2012 at 3:17am
IP IP Logged
bainsteven
Newbie
Newbie
Avatar

Joined: 15 Mar 2012
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote bainsteven Replybullet Posted: 05 Apr 2012 at 5:59am
Fixed!
 
I was using the 30-day trial version originally then upgraded by entering my License Number (therefore meaning I was using RTM version 11.5.0.313).
 
I uninstalled it, and downloaded the version available from my SAP Online Store (which happens to be SP4: 11.5.10.1263).  It now works correctly!  Smile
 
I'm off for a long weekend - I'll upgrade to SP6 when I return on Tuesday.
 
Thanks for taking the time to respond Ryan... hopefully this will help someone else in the future.
 
Cheers,
 
Steve.
 
IP IP Logged
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