Reply
 
LinkBack Thread Tools Display Modes
Old 02-10-2011, 05:20 PM   #1 (permalink)
Junior Member
 
Join Date: Dec 2009
Posts: 1
design@terra-nova.biz is on a distinguished road
Default How to access ContractPercentages XML dataset

Background:
We use a custom proposal that calculates custom line item totals based off each line item's 'taxable' field setting. Basically, if the line item is checked 'taxable' it gets one tax value calculated for it, if not it gets a different tax calculation. When the proposal runs it goes through each line item and calculates out our new line item amounts, and a new grand total for the project.

Since we are not using the standard SI5 line item calculations, and the amounts for each line total and GrandTotals are different than SI5's method, we cannot use any of the standard built-in functions for line item values or project total amounts...

Problem:
We now need to create a sub-report that shows the billing summary with billing percentages/amounts. However, we need the summary to use our custom values instead.

I looked through the forums and documentation and cannot find anything except the ReportUtilities.SetContractAmounts method... I see how for Items/ProposalItems we can create a itm. variable and iterate through those XML datasets, but I cannot find a DTools.SystemIntegrator.Reporting.ContractPercenta ges datatype.

We do have a 'Contract Payments' sub-report right now that iterates over //dtp:ContractPercentages/dtp:ContractPercentage and it has a script that is COMPLETELY BLANK and the detail section still seems to pull the proper DTools data for each node... but it is using the standard values which are wrong for our setup.

So we really just need a way to grab the ContractPercentages XML dataset and calculate out new values for each ContractPercentage node. So we would need the 'PaymentType' strings, 'BillingDate', and 'BillingPercentage' data.


Q) Does anyone know how can we go about accessing the ContractPercentages XML dataset in the script???
design@terra-nova.biz is offline   Reply With Quote
Old 02-11-2011, 08:15 AM   #2 (permalink)
Senior Member
 
Join Date: May 2009
Location: Chennai, India
Posts: 157
nkarthick is on a distinguished road
Default Try this idea

Hi,

There is more than one way to handle (manipulate) the Contract percentage value in the scripts.

Will tell you the easy way –

In the Contract Subreport (your custom report) –
  • Add the standard (Bound) fields (payment type, billing percentage, etc) into the group section where do you want to display the calculated values.
  • Hide the standard (bound) values by setting Visible property to false. Also include Unbound textbox to display your calculated values.
  • In the script side Read the standard values (payment type, billing percentage, etc) in the respective group’s format event procedure.
  • Do your custom calculation based on readed values and reassign the calculated values into the unbound textbox respectively.

How to do the above stuff?

For example sake let us consider we are reading the contract billing Amount and incremented that value by 100 and reassign that incremented value to the unbound textbox.
  • In the contract subreport include the BillingAmount (Bopund textbox) in to the group let us called as “grpContract” and billingamount textbox named it as “txtBillingAmount”.
  • Add one more unbound textbox (DataField property set to empty) and named it as “txtBillingAmount2” to show calculated value.
  • Hide the standard billing amount by setting the Visible property of “txtBillingAmount” to False.
  • In the script side include “grpContract_Format” event procedure.
  • In the format event procedure read the billing amount value by using ReturnTextBoxValue method of ReportUtilities.

    o ReportUtilities.ReturnTextBoxValue(rpt, “grpContract”, “txtBillingAmount”)
  • Increment the grabbed (readed) billing amount value by 100.
  • Reassign the incremented value to the into the “txtBillingAmount2” by using SetTextBoxValue method of ReportUtilities.


Final Code will look like this –

Sub grpContract_Format

Dim billingamount As Double

billingamount = Double.Parse(ReportUtilities.ReturnTextBoxValue(rpt,"grp Contract","txtBillingAmount"))

billingamount = billingamount + 100

ReportUtilities.SetTextBoxValue(rpt, "grpContract","txtBillingAmount2", billingamount)


End Sub
This post is just to give you an idea and its not the solution to your problem

Hope it helps.
__________________
Narayana Karthik

Last edited by nkarthick; 02-11-2011 at 08:19 AM.
nkarthick is offline   Reply With Quote
Reply

Tags
billingamount, billingdate, billingpercentage, contractpercentage, paymenttype


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On



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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
D-Tools, Inc.