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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

YTD column in manual cross tab report

Status
Not open for further replies.

bobby72

Programmer
Oct 1, 2002
7
US
I need a very urgent help . I have made a manual cross tab report in which I am displaying the data in the fromat below

NoV Dec YTD Jan Feb YTD
2001 2001 2001 2002 2002 2002
$10.00 $5.00 $100.00 $10.00 $15.00 $80.00

now here I am suppose to put the value in YTD 2001 coulmn the sum for all the months of 2001 not only the sum of reports fields Nov and Dec. Similar with the 2002. The months in the report appears because of user passing the date range. Is this any way possible in CR. I am pulling all the data in my query which i am using in developing the report. I pass the date range to the full data recordset.


 
If you have developed this as a manual cross tab, I assume that you must be using variables. The variable definition will be using month in some way, so you can add an additional definition for the year.

If this is not clear post an example of your variable declare formula and then I could comment further.

Ian
 
I have written the used the months variales as ?fromdate and keep on adding month to it till is <= ?todate.
This is one thing but what I want to know that suppose the
?startdate is Nov 2001 and the table has data from Jan 2001 so though I will display data in the report from Nov 2001 onwards but when it comes to YTD 2001 it should be sum from Jan 2001 to Dec 2001 any idea how to achieve that?

Besides this I have a general query. I am using good number of formulas in my report will that effect the speed of dataloading in the table.

My report is very slow ..what could be the reason.

 
If you want the user to be able to select November, and you want the report to include YTD based on January records, then make sure that you don't limit your selection criteria to the range of the parameters.

So if the startDate is 11/1/2001, your selection formula could be:

{Datefield} in Date ( Year({?StartDate} ) ,1 ,1)
to {?EndDate}

If you don't include January in your query, it can't be totalled in the report. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top