Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change field configuration based on date selection 1

Status
Not open for further replies.

josephwc

Programmer
Oct 13, 2005
83
US
Hello,

I have 36 fields representing the next 36 months of forecasted revenue. Is there any way I can just show 12 fields at a time. The first month of the 12 months worht of fields would be selected based on the user choosing a start month as a parameter value.

 
Please show samples of the fields you are working with. Is there a separate date field? Or is each monthly forecast distinguished by its name?

-LB
 
Just show 12 fields at a time...Sure, just put the 12 fields on the report.

Always astonished at how little people want to share about their requirements, are they really that unappetizing for most to share?

Crystal version?
Databaase/connectivity used?
Example data
Expected output?

Maybe you mean you want the first 12 fields on the first page, the next 12 ont the next, and the final of the third page?

If so, right click the details and select insert section below, do it one more time.

Place 12 fields in the first detail section, next 12 in the next, final 12 in the 3rd details section, right click detail section a and select format section, then select new page after.

Do this also for detail section b (the 2nd one).

You may notice that my descriptions differ from your screen terms, this is because I don't know your Crystal version.

-k
 
Crystal version? 11

Database/connectivity used? Microsoft Access XP

Example data Field Names: December 2005, January 2006, February 2006, March 2006, etc to December 2008. These fields contain forecasted Numbers for a project (ex. Project XYZ for December 2006 = 50,000.

Expected output?
I was hoping that I could select a start month as a Parameter value and see the fields that correspond to that month and 12 months forward (ex. Parameter Selection "April 2006", expected fields to show April 2006, May 2006, June 2006 to April 2007.
I hope this makes what I am trying to do clear.
Thank you


 
I think you would be better off "merging" the forecast months into one field using a union statement in the "add command" area:

Select table.`project`, table.`December 2005` as Forecast,
{ts '2005-12-01 00:00:00') as Datex
From `table` table
union all
Select table.`project`, table.`January 2006` as Forecast,
{ts '2006-01-01 00:00:00) as Datex
From `table` table
union all //etc.

Then you could easily use {Command.Datex} in a record selection formula, as in:

{Command.Datex} in {?Date}-day({?Date})+1 to dateadd("M",11,{?Date})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top