Solved

crystal reports and Delphi - changing selection criteria of sub report

Posted on 2013-02-04
5
1,032 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 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 101

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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