Print Page | Close Window

Issue with formula

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21365
Printed Date: 03 May 2024 at 4:44am


Topic: Issue with formula
Posted By: absiin
Subject: Issue with formula
Date Posted: 08 Mar 2015 at 11:54pm
Hi all :)

right i'm overlysuck with a VAT issue...

I've got a VAT table on my db and a historic VAT with every date the rate has changed on.

Now my issue is - invoices are being raised and the VAT field is coming from the main VAT db which only holds the current VAT rate but if I need to re-print an invoice that was raised before the change of VAT it doesn't take in consideration the date of the invoice...

Now i've tried creating a table with start and end date but that won't be dynamic given the fact it each time VAT changes it would have to be manually changed..

Anyone has any ideas on how could i do this?

Invoice    ¦ VAT
Vat Code ---> Vat Code

Invoice    ¦   VAT Historic
Inv Date ---> Vat Date
Vat Code ---> Vat Code

I'm confused as well..!

What I'm using is a formula field with this:

IF
{INVOICE.DATE} in Date({VATHIST.STARTDATE}) to Date({VATHIST.ENDDATE})
THEN
ToText ({VATHIST.RATE}) + "%"
ELSE
ToText ({VAT.VATRATE}) + "%"

And as I would expect, it doesn't work!
Dying over here guys! Any help would be immensely appreciated!

-------------
Absiin ~



Print Page | Close Window