Filter data for subreport 
Author Message
 Filter data for subreport

Hi
Just posted a question but forgot this one.
I have a sales report that compares sales for 3 years, divided either by
regions, salesperson, customers category, etc.
The database holds more than those 3 years but I want to select only those 3
years for my report.
But why does the subreport give me all the figures for all the years in my
database when my record selection formula is for Y1, Y2 and Y3 ?
Is there a "selection formula" I can supply in  VB6 to filter the data for
my subreport ?
Have'nt found anything in the help file yet.
Help would be appreciated.
Using VB6 and CR6
Thanks
Gilles.
Drummondville, Quebec, Canada.


Thu, 25 Aug 2005 04:19:26 GMT  
 Filter data for subreport
Do you use Subreport Links? If no then try to right click subreport, on the
popup menu click on Subreport Links item and then select appropriate field
to link subreport with report. If you did it already then I have no more
ideas
vasya


Quote:
> Hi
> Just posted a question but forgot this one.
> I have a sales report that compares sales for 3 years, divided either by
> regions, salesperson, customers category, etc.
> The database holds more than those 3 years but I want to select only those
3
> years for my report.
> But why does the subreport give me all the figures for all the years in my
> database when my record selection formula is for Y1, Y2 and Y3 ?
> Is there a "selection formula" I can supply in  VB6 to filter the data for
> my subreport ?
> Have'nt found anything in the help file yet.
> Help would be appreciated.
> Using VB6 and CR6
> Thanks
> Gilles.
> Drummondville, Quebec, Canada.



Thu, 25 Aug 2005 21:43:36 GMT  
 Filter data for subreport
Hi Gilles,
    I may be wrong, but I believe that the records are returned to your
report based on the query.  Then, your record selection formula is used to
restrict the records actually used in the report.  If you want to restrict
the records being collected, then you have to fine tune your query, or
possibly base the report on a stored procedure or view that will collect
only the records that you need.

Bob Holmes


Quote:
> Hi
> Just posted a question but forgot this one.
> I have a sales report that compares sales for 3 years, divided either by
> regions, salesperson, customers category, etc.
> The database holds more than those 3 years but I want to select only those
3
> years for my report.
> But why does the subreport give me all the figures for all the years in my
> database when my record selection formula is for Y1, Y2 and Y3 ?
> Is there a "selection formula" I can supply in  VB6 to filter the data for
> my subreport ?
> Have'nt found anything in the help file yet.
> Help would be appreciated.
> Using VB6 and CR6
> Thanks
> Gilles.
> Drummondville, Quebec, Canada.



Fri, 26 Aug 2005 22:57:44 GMT  
 Filter data for subreport
Hi Giles,

You might try in the records selection formula somthing like :
 = {Years_Date} > '01/01/1999'

Wouldn't this filter your records selected? You can also apply the
logic to an external select statement if you build the data/recordset
outside of the report.

HTH,
Tom

Quote:

> Hi
> Just posted a question but forgot this one.
> I have a sales report that compares sales for 3 years, divided either by
> regions, salesperson, customers category, etc.
> The database holds more than those 3 years but I want to select only those 3
> years for my report.
> But why does the subreport give me all the figures for all the years in my
> database when my record selection formula is for Y1, Y2 and Y3 ?
> Is there a "selection formula" I can supply in  VB6 to filter the data for
> my subreport ?
> Have'nt found anything in the help file yet.
> Help would be appreciated.
> Using VB6 and CR6
> Thanks
> Gilles.
> Drummondville, Quebec, Canada.



Sat, 27 Aug 2005 05:28:05 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using data from a subreports, in other subreport :|

2. Saving User custom filters or Exporting filtered data

3. filtering subreports based on main report fields

4. viewing subreports/procedures called by subreports

5. Could I Add a Subreport to a Subreport?

6. Subreports in subreports

7. Subreports within Subreports

8. Subreport: cannot/don't know how to refresh subreport dbname thru VB Code

9. SubReport within a SubReport?

10. Subreport in subreport ?

11. Subreports in subreports

12. vb5 Crystal Reports 6 and Subreports Can we conditionally call subreports from primary reports

 

 
Powered by phpBB® Forum Software