Print Page | Close Window

Passing all report values to sub report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12058
Printed Date: 02 May 2024 at 1:42pm


Topic: Passing all report values to sub report
Posted By: AmitJ
Subject: Passing all report values to sub report
Date Posted: 12 Jan 2011 at 10:20pm
Hello All,
 
I have created crystal report with subreport in it.
 
I have two prompts in my main report as
1.City
2.School
 
My main report displays information of student id and student name for selected city and school.
 
  student id      Student name
   001               Peter                      View Detail
   002               John                       View Detail
   003               Alex                        View Detail
 
I have subreport View Detail.rpt that gives detail information of student.
 
Now if i select View Detail for student 001, detail report will display detail information for that student.
 
Requirement is that I need to provide "View ALL" option in main report so that detail repot can display information for all students in Sub report.
 
Is there any way to pass all values of report field column to subreport ?
 
Please  let me know how to achieve this functionality in Crystal Report.
 
Note:- Report is directly based on database and no Business View is implemented.
 
Thanks,
Amit J
  
 



Replies:
Posted By: rahulwalawalkar
Date Posted: 14 Jan 2011 at 3:22am
Hi
 
1) Create another Ondemand subreport with the details that you want to display.Name it ViewAll .
2)Insert that Subreport in your Main Report.
3) Then link the View All subreport with City and School as parameters.
4) so in the ViewAll subreport your record selection should be city and school so it will display all the students which belong to that city and school
 
Cheers
Rahul


Posted By: AmitJ
Date Posted: 16 Jan 2011 at 8:58pm
Hello Rahul,
 
Many thanks for your insights.
i have implemented the solution and found its working gr8..!!Clap
 
Now I have two subreports in main report. i.e. View Detail and View All.
 
i have gone through different crystal forums, blogs and material and found that addition of Subreport will degrade performance.
 
So will these two subreports also degrade performance of my report?Ouch
 


Posted By: sa-user
Date Posted: 08 Jul 2011 at 4:52am
I am new to CR and looking to implement something like the one you have.
How can i achieve this. Thanks in advance
 
EX:
Main Report

Product
abc
def
pqr

above products should be links and when clicked on any it should give that product specific data
ex: when clicked on abc sub report opens up for abc. [similarly when clicked on def or pqr sub reports with its detail should open up]

Sub report

Product  = abc
unit = 30
dosage form = oral



Print Page | Close Window