Solved

Crystal Link to Sub-reports

Posted on 2013-11-14
1
840 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

734 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