Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUB REPORT - RECORDS PROBLEM

Status
Not open for further replies.

BHAT100

Programmer
Dec 5, 2002
115
CA
crystal report: 9:0
sql server

I have linked subreport with customerid to main report. all
customers are existed in the system. despite that all customers of subreport are not showing in the main report.

what ever customers are not existed in the main report. data of those customer are not been pulled over to main report.

Any idea on above to make sure to all customers of subreport are pulled to the main report


Thanks

-bhat
 
If there are more customers in the subreport, and if all customers in the main report are found in the subreport table, then your subreport should be your main report.

-LB
 
Thank you for your reply LBass

My problem is: The main report has more customers but there are some customers who are existed in subreport are not in main report.

Main report has sales transactions from: 24th Nov'04 - onwards
and subreport have sales transactions for period upto 24th Nov for the month of November.

Thanks Again

-bhat
 
You won't be able to get the results you want with one subreport. You could leave your report design as is, and add a subreport in the report footer that captures those customers who are not represented in the main report. If you need to use results from the subreports for further calculations, this will become complex.

Why are you using a subreport? Is the information coming from different datasources? If it is from two different tables with similar fields, you could use a union all statement to get the information in a form where there is no need for a subreport.

-LB
 
What if you removed the "select data in subreport based on field" checkbox from the subreport links.

Wouldn't that allow you to see "SOME" customers in the main report and "ALL" customers in the MAIN report?

-- Jason
"It's Just Ones and Zeros
 
yes, Information is coming from different tables but from same database,
for example sales orders tables and another is from AR tables. AR tables does not line sales details(by item)whereas sales order table i.e.SOP30300 has line detail sales.

we implemented sales order on nov 24'2004 so after nov 24'2004 we have sales by line item in sales order tables but before Nov'24 sales are recorded in AR, it has sales by invoice only.

Now I need sales report from Nov01 by sales lines. therefore I need information for period from nov01-24 that is avialable in AR tables for which I am making subreport to pull information for each customer for every salesperson.

Thanks for reply

-bhat
 
Do you have a table that has all customers in it? If so, use that for your main report to get all customers and then add two separate subreports--one for the sales order table and one for the AR table, each with their own date criteria. Or you could use a left join from the master table to the sales order table without using any date criteria--use the date criteria instead to suppress unwanted records. Then the subreport will appear for the appropriate customers.

-LB
 
Great LB, Thanks for your reply.now I am working the way you explained above

Thanks Again

-bhat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top