Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

crystal reports and Delphi - changing selection criteria of sub report

Posted on 2013-02-04
5
Medium Priority
?
1,039 Views
Last Modified: 2013-08-16
I have a crystal reports xi report which has a main report and subreport. I wish to set the selection criteria within the subreport to select by date.

I am accessing the crystal report through the VCL from Delphi 2007  but am at a loss as how I can modify the subreport selection through the vcl.

Can anyone help?
0
Comment
Question by:robertminjoot
[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
5 Comments
 
LVL 19

Accepted Solution

by:
Thommy earned 1000 total points
ID: 38852563
Maybe this previous EE question can help you
Delphi 7 with Crystal Reports

Especially have a look at below code part in the Accepted solution
if (crRepObject.Kind = crSubReportObject) then
                begin
                  // get the sub report object
                  crSubRep:= ISubreportObject(crRepObject);
                  // open the subreport
                  crSubReport:= crSubRep.OpenSubreport;

Open in new window

0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1000 total points
ID: 38853462
You then treat the subreport as a report and change it just ike you would a report using crSubReport

mlmcc
0
 

Author Comment

by:robertminjoot
ID: 38854698
Thanks for the suggested solutions. While they didn't solve my problem they did point my mind in the right direction.

I needed to access the subreport through the VCL. What I needed was:

CRreport.SubReports[1].Selection.Formula.Text := 'The selection formula'.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

610 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