PC Review


Reply
Thread Tools Rate Thread

Acess2000: How to get reports filter condition into reports header?

 
 
Arvi Laanemets
Guest
Posts: n/a
 
      22nd Jan 2006
Hi

The report is started from procedure
......
If Int(varRepMonth) = CDbl(varRepMonth) Then
varRepFilter = "INT(CDbl(Month)) = " & CDbl(varRepMonth)
Else
varRepFilter = "Month = '" & varRepMonth & "'"
End If
DoCmd.OpenReport varRepName, acViewNormal, , varRepFilter
.....

The field Month in reports source query is calculated as
...., Format$([Routes].[RouteDate],'yyyy.mm') AS Month, ...
, i.e. it has string values like "2006.01" etc.

The date interval for report is selected from combo (cbbRepPeriod), and can
have string values like "2006.01" or "2006" - as follows reports can be
monthly or yearly ones. Values are read from 2-column query, where the in
second column are values like "Yanuary 2006" or "Year 2006" respectiveli.

Is it possible to get the report header to be displayed like
StringValue & " for Yanuary 2006" or StringValue & " for Year 2006"


Thanks in advance!
Arvi Laanemets


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmljayBDb2UoVUsp?=
Guest
Posts: n/a
 
      22nd Jan 2006
Arvi,

Can't you just put a text control on the report and then set its source to
your expression?

Or are you doing that and it doesn't work?

--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades


"Arvi Laanemets" wrote:

> Hi
>
> The report is started from procedure
> ......
> If Int(varRepMonth) = CDbl(varRepMonth) Then
> varRepFilter = "INT(CDbl(Month)) = " & CDbl(varRepMonth)
> Else
> varRepFilter = "Month = '" & varRepMonth & "'"
> End If
> DoCmd.OpenReport varRepName, acViewNormal, , varRepFilter
> .....
>
> The field Month in reports source query is calculated as
> ...., Format$([Routes].[RouteDate],'yyyy.mm') AS Month, ...
> , i.e. it has string values like "2006.01" etc.
>
> The date interval for report is selected from combo (cbbRepPeriod), and can
> have string values like "2006.01" or "2006" - as follows reports can be
> monthly or yearly ones. Values are read from 2-column query, where the in
> second column are values like "Yanuary 2006" or "Year 2006" respectiveli.
>
> Is it possible to get the report header to be displayed like
> StringValue & " for Yanuary 2006" or StringValue & " for Year 2006"
>
>
> Thanks in advance!
> Arvi Laanemets
>
>
>

 
Reply With Quote
 
Arvi Laanemets
Guest
Posts: n/a
 
      22nd Jan 2006
Hi


"Nick Coe (UK)" <(E-Mail Removed)> wrote in message
news70F828C-5C4C-470F-8B9B-(E-Mail Removed)...
> Arvi,
>
> Can't you just put a text control on the report and then set its source to
> your expression?


Yep! Did find this solution myself too. Of-course the report returns error
whenever not started from code, but I can live with it.


Thanks
Arvi Laanemets


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter and WHERE condition for 2 similar reports =?Utf-8?B?V29vZHlBY2Nlc3M=?= Microsoft Access Reports 1 1st Dec 2006 06:21 PM
Acess2000: How to get reports filter condition into reports header? Arvi Laanemets Microsoft Access Reports 2 22nd Jan 2006 11:01 AM
Urgent: Condition Reports Ashish Kanoongo Microsoft Access Forms 1 3rd Dec 2003 07:26 AM
Urgent: Condition Reports Ashish Kanoongo Microsoft Access Form Coding 1 3rd Dec 2003 07:26 AM
Urgent: Condition Reports Ashish Kanoongo Microsoft Access Reports 1 3rd Dec 2003 07:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:28 PM.