Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Newbie - Driving Queries Post Reply Post New Topic
Author Message
jessiemacmillan
Newbie
Newbie
Avatar

Joined: 17 Apr 2008
Location: United States
Online Status: Offline
Posts: 18
Quote jessiemacmillan Replybullet Topic: Newbie - Driving Queries
     Posted: 27 Jun 2008 at 1:31pm
I'm used to working in Access to get data for reports from a SQL db using ODBC. Now I'm learning Crystal Reports and having trouble understanding something. I'm such a newbie that I don't know the lingo, so I'll try to explain myself.

When I create a set of queries in Access, I often start with what I call a "driving query." The driving query gets all the data I need and I use it as the basis for all other queries related to a single report. If I need to change a parameter, such as a date, I only have change it in the driving query.

Is there something similar in Crystal Reports? I'm using version XI. So far, the only thing I've been able to come up with is to create a report with my driving query, then open it and do a Save As to create the other queries I need. That really seems like the long way around the barn because then I'll need to change the date in each individual report.

Can someone point me in the right direction?

Thanks,
Jessie
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 30 Jun 2008 at 4:31am
Hi,
 
I am not that familiar with Access db,I think you can create a view or Stored Proc in Access and then change the date parameter in them.Or else
 
Create a Prompt in Crystal Which accepts the Date as parameter and generate different reports .
 
I am still not clear with this para in your post
So far, the only thing I've been able to come up with is to create a report with my driving query, then open it and do a Save As to create the other queries I need. That really seems like the long way around the barn because then I'll need to change the date in each individual report.
 
cheers
Rahul
IP IP Logged
jessiemacmillan
Newbie
Newbie
Avatar

Joined: 17 Apr 2008
Location: United States
Online Status: Offline
Posts: 18
Quote jessiemacmillan Replybullet Posted: 30 Jun 2008 at 1:01pm
Sorry, I'll try to be clearer.

In Access, I can create a selection query that gets all of the data I need for multiple reports. For example, I need to report on the number of orders by the county of residence of the customer, the way they paid for their order, the language they spoke, whether the order has shipped, and so on.

Once I've created the query and verified that I'm getting all the data accurately, I can generate different summary reports from that one query. For example, one report might count orders shipped by payment type, while another report might be count language spoken by customer residence.

I need only change the parameters in the driving query and all the reports reflect that one change.

To avoid having multiple reports from one data set, do I need to work with subreports? Or is there some way to select a data set and get all the reports I need from it without having to set parameters in each report?

Thanks,
Jessie

Another way
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 01 Jul 2008 at 3:13am
Hi Jessie,
 
Sub-Reports could be the answer as for what you are trying to do. you can create a Main Report and then create related subreports, then based on the parameter in main report pass the parameter value to the relevant subreport to generate the Subreport Data .
 
So Main Report will be Detailed Report and remaining will be Summary reports
 
cheers
Rahul
IP IP Logged
jessiemacmillan
Newbie
Newbie
Avatar

Joined: 17 Apr 2008
Location: United States
Online Status: Offline
Posts: 18
Quote jessiemacmillan Replybullet Posted: 01 Jul 2008 at 5:04am
Thanks, Rahul! I'll give it a try!

Jessie
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum