Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Tips and Tricks
Message Icon Topic: Problem in displaying Not NULL columns Post Reply Post New Topic
Author Message
rahulsi
Newbie
Newbie
Avatar

Joined: 02 Sep 2011
Location: India
Online Status: Offline
Posts: 1
Quote rahulsi Replybullet Topic: Problem in displaying Not NULL columns
    Posted: 02 Sep 2011 at 9:14pm

Hi ALL,

   I want to display only those TaxRate's columns whose value is not NULL,the TaxRate's columns whose value is NULL should not display and If there is no value for any taxrate's column in the data, then it should Display only 'Excempt' column.


This is my Query.......

SELECT DISTINCT T0.DocNum AS 'Debit Note No.', T0.CardName AS 'Name', T0.CardCode AS 'code', T0.NumAtCard AS 'Supplier Ref.'
     ,T1.Dscription AS 'Description of Goods', T0.Address, T1.Quantity, T1.Price AS 'Rate', T1.LineTotal AS 'Amount', T0.DocDate,
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0)FROM RPC4 WHERE RPC4.StaType = -90 AND RPC4.DocEntry = T0.DocEntry) AS 'Basic Excise Duty BED@10 %',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -60 AND RPC4.DocEntry = T0.DocEntry) AS 'Education Cess @2%',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -55 AND RPC4.DocEntry = T0.DocEntry) AS 'Secondary Education Cess @1%',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 4 AND RPC4.StaCode = 'CST2' AND RPC4.DocEntry = T0.DocEntry) AS 'Central Sales Tax(CST)',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1 AND RPC4.StaCode = 'VAT4'AND RPC4.DocEntry = T0.DocEntry) AS 'Input VAT@5%',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1 AND RPC4.StaCode = 'VAT12.5'AND RPC4.DocEntry = T0.DocEntry) AS 'VAT12.5%',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 18 AND RPC4.StaCode = 'Add2'AND RPC4.DocEntry = T0.DocEntry) AS   'ADD Tax 1%',
     (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 7 AND RPC4.DocEntry = T0.DocEntry) AS 'Excempt'
FROM ORPC T0
     INNER JOIN RPC1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T0.CardCode = 'V00308') AND (T0.DocNum = '9220004)


Thanks
Rahul
rahul
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.