Solved

crystal reports and Delphi - changing selection criteria of sub report

Posted on 2013-02-04
5
985 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
5 Comments
 
LVL 19

Accepted Solution

by:
Thommy earned 250 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 100

Assisted Solution

by:mlmcc
mlmcc earned 250 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now