TaxAndGovernmentDetailChargeFee

Discussions related to Crystal Reports development.

Moderator: Lisa Ennis

Post Reply
ckootg
Posts: 106
Joined: Fri Jan 06, 2012 6:10 pm

TaxAndGovernmentDetailChargeFee

Post by ckootg » Mon Nov 02, 2015 9:18 pm

I want to get the documents to be recorded from the TaxAndGovernmentDetailChargeFee table.

I'm able to get the table via code with

Code: Select all

((dynamic)_order).CDFs[0].TaxesAndGovernmentFeesSection.Lines
but unable to get it via SQL

Code: Select all

SELECT
    TAGDCF.*
FROM
	pf.[Order] AS O
	INNER JOIN pfm.[Order] AS ORD ON ORD.RootId# = O.RootID
	INNER JOIN pfm.CDF AS C ON C.RootId# = ORD.RootId# AND C.Id# BETWEEN ORD.Id# AND ORD.LastId#
	INNER JOIN pfm.CDFLine AS CL ON CL.RootId# = C.RootId# AND CL.Id# BETWEEN C.Id# AND C.LastId#
	INNER JOIN pfm.CDFCharge AS CC ON CC.RootId# = CL.RootId# AND CC.Id# BETWEEN CL.Id# AND CL.LastId#
	INNER JOIN pfm.TaxAndGovernmentDetailSection AS TAGDS ON TAGDS.RootId# = CC.RootId# AND TAGDS.Id# BETWEEN CC.Id# AND CC.LastId#
	INNER JOIN pfm.TaxAndGovernmentDetailChargeFee AS TAGDCF ON TAGDCF.RootId# = TAGDS.RootId# AND TAGDCF.Id# BETWEEN TAGDS.Id# AND TAGDS.LastId#
Any help appreciated.

Lisa Ennis
Posts: 77
Joined: Thu Sep 11, 2008 1:57 pm

Re: TaxAndGovernmentDetailChargeFee

Post by Lisa Ennis » Tue Nov 03, 2015 10:51 am

You do not need the join to the pfm.TaxAndGovernmentDetailSection table. The code below is the correct join.

Code: Select all

SELECT
    TAGDCF.*
FROM
   pf.[Order] AS O
   INNER JOIN pfm.[Order] AS ORD ON ORD.RootId# = O.RootID
   INNER JOIN pfm.CDF AS C ON C.RootId# = ORD.RootId# AND C.Id# BETWEEN ORD.Id# AND ORD.LastId#
   INNER JOIN pfm.CDFLine AS CL ON CL.RootId# = C.RootId# AND CL.Id# BETWEEN C.Id# AND C.LastId#
   INNER JOIN pfm.CDFCharge AS CC ON CC.RootId# = CL.RootId# AND CC.Id# BETWEEN CL.Id# AND CL.LastId#
   INNER JOIN pfm.TaxAndGovernmentDetailChargeFee AS TAGDCF ON TAGDCF.RootId# = CC.RootId# AND TAGDCF.Id# BETWEEN CC.Id# AND CC.LastId#
Lisa Ennis
Report Developer
SoftPro

ckootg
Posts: 106
Joined: Fri Jan 06, 2012 6:10 pm

Re: TaxAndGovernmentDetailChargeFee

Post by ckootg » Tue Nov 03, 2015 3:06 pm

Thanks!

Where can we get an updated copy of the database guide? The one I have is for SoftPro Select 3.0, July 21, 2014.

Lisa Ennis
Posts: 77
Joined: Thu Sep 11, 2008 1:57 pm

Re: TaxAndGovernmentDetailChargeFee

Post by Lisa Ennis » Tue Nov 03, 2015 5:26 pm

Email me directly at lisa.ennis@softprocorp.com and I will get it to you.
Lisa Ennis
Report Developer
SoftPro

Post Reply