Solved

Crystal Link to Sub-reports

Posted on 2013-11-14
1
835 Views
Last Modified: 2013-11-15
Can i use "LIKE" or "STARSWITH" in  a Sub-report link?

Does a sub-report read the first record and then process data, and then the second record or does it have to read every record for each link in the sub report?

Problem is:
Created a report that show sales for specific items for specified customers during a date range.  I trimmed the item Name to 5 letters in a formula field.
(the item we are comparing against are samples, all samples begin with "SS".  Trimed the Item code so that is represents the non-sample item code.)

I create and run a separate report using Parameter fields entering in the Customer number and the Special Item codes and I get data returned.  I did this to test linking up the sub-report.
But when I add the sub report to the original report it hangs,(of course I updated the links to the sub report and verified that the Report Selection Formulas are correct.
when I run the report I get some data but when I go to page 2 it seems to hang.
I get the first customer data back, this customer sub-report is blank because it did not meet the criteria for the sub report.

In the main report I have a detail section with the customer number, item number, invoice date, invoice number. quantity sold, and custom filed that I trimed using the MID function well call it SPECIAL ITEM CODE.
This main report is grouped using the Customer number and the detail records are sorted by Date.

I insert the new sub-report into the Group footer for the customer number group.
 
Because the main report has Customers detail records that do not meet the sub-report links it will return a blank sub-reports (I like to have these records be removed?)

It also seems to stop running, because whenever I go to view the next page of data it locks up and start to recalculate the report?

So....If I can, How do I link the sub-report correctly so that it runs only returns customer sales data that is matched?

Also does it make a big difference which section I insert the sub-report?

I am so close to making this work, I think!
0
Comment
Question by:Scott Johnston
1 Comment
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39650185
The link itself can't be changed however you can edit the subreport selection formula so it selects the records you want based on the linked value.

It makes a huge difference where you put the subreport
It runs 1 time for each time that section is displayed

Page Header/footer - 1 time per page.  Subreport in page footer cannot grow because the page footer can't grow.

Report header/footer - 1 time per report

Group header/footer - 1 time per group

Details - 1 time for each record in the report

How to link
You need to select fields from the main report that will identify the data you want in the subreport.

What you use is totally dependent on the data and what you need.

mlmcc
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pagination Difference  in crystal report 7 51
Crystal Report for VS2013 17 107
Crystal Reports get subgroup count 1 50
Crystal Formula to "conditionally count/sum" 3 53
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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