|
-
August 4th, 2010, 02:44 PM
#1
Provide Monthly Totals vs YTD Totals in a Subreport
Hello Everyone,
I really need your help, I am stumped in trying to figure out how I can show monthly totals (based on selection of month/year) against the ytd totals in a subreport. Here is what I am doing:
I am creating program that would produce different kinds of expense reports for our Finance Department. When an enduser logs into the program, the login credentials will determine what department he/she belongs to. The enduser will have the option to run the expense report in the following mode (monthly, quarterly, semi-annual and ytd).
I have set up 3 subreports that will track info based on their department into 3 sections (Personnel, Department Specfic and Centrally Managed). Each subreport represent each sections. The coding for choosing a department (in case the enduser belongs to more than one department) works fine but now I am trying to show monthly figures versus ytd figures.
The layout of the report is in two columns:
Monthly Rollup (based on selecting month/year)
- Actuals
- Plan
- Variance
- % Change
Year-to-Date Rollup
- Actuals
- Plan
- Variance
- % Change
The records for each section is grouped by the field called "Line_Text" along with the other fields(actuals, plan, variance and % change). They have been placed in the Group Header.
What I am trying to determine is how I can pull selected record based on the parameter field called "PDate" so that I can see monthly figures in the Monthly Rollup section?
In the Selection Formulas/Records in one of the subreport, I have this coding:
{ActualVsPlan.Description}={?Pm-@BU_Code}
and
If Not IsNull({@PDate}) then
(DatePart ("m", {ActualVsPlan.Expense_Date})= DatePart ("m", {@PDate})
and
DatePart ("yyyy", {ActualVsPlan.Expense_Date})= DatePart ("yyyy", {@PDate}))
The BU_Code is the department field name that is called from the main report using Subreport Links.
When I run the report, the totals are the same for both Monthly and Year-to-Date.
I know that I am missing something and it has to do with the actual fields that are deemed for the monthy totals but I am clueless as to how I can put this together.
Can someone help me and put me on the right track?
Please let me know if you need more information or samples.
Any help is greatly appreciated. Thank you.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|