Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: i want all subtotal in report footer (urgent) Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jun 2009 at 9:48am
If you mean that you have 2 subreports that you are displaying in a main report and you need to sum these subreport displayed values in the main report then you would need to use shared variables to pass the data from one report to the other. These are not my strong suit. So if I am correct in this assumption I would suggest first you do a forum search on Shared variables and sub reports as there are a number of examples of this process. If that does not work start a new post asking for assistance specific to that need.

Edited by DBlank - 10 Jun 2009 at 9:49am
IP IP Logged
kamsri153
Newbie
Newbie
Avatar

Joined: 26 May 2009
Location: India
Online Status: Offline
Posts: 17
Quote kamsri153 Replybullet Posted: 10 Jun 2009 at 10:15am
no both reports separate no subreport i want this total values in another report.
i am using separate query for both credit and debit report. but same table only
 
how to calculate the debit and credit. in single query.Please tell me.
 
 
 
IP IP Logged
kamsri153
Newbie
Newbie
Avatar

Joined: 26 May 2009
Location: India
Online Status: Offline
Posts: 17
Quote kamsri153 Replybullet Posted: 10 Jun 2009 at 10:18am

select

cd.cdr_reporttype,m.mhb_code,sum(cast(round((cd.cdr_Postage*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3))) as postage,

sum(cast(round((cd.cdr_HandlingCost*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3))) as HandlingCost,

sum(cast(round((cd.cdr_TranshipmentLH*dbo.fn_CurrencyUnit('CUR0005')),3)as decimal(15,3))) as Tanat_LH,

sum(cast(round((cd.cdr_Postage*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3)))+

sum(cast(round((cd.cdr_HandlingCost*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3)))+

sum(cast(round((cd.cdr_TranshipmentLH*dbo.fn_CurrencyUnit('CUR0005')),3)as decimal(15,3))) as TotalCosts

from

mos_IEL i with(nolock),mos_DisposalCode d with(nolock),mos_MailHub m with(nolock),mos_MailHub mo with(nolock),

mos_cdreport cd with(nolock),mos_servicetype s with(nolock)

where

cd.cdr_id=isnull(null,cd.cdr_id) and

i.IEL_IELNumber=cd.cdr_IELNumber and

cd.cdr_disposalid=d.dis_id and m.mhb_id=cd.cdr_remailcentreid and

mo.mhb_id=cd.cdr_origincentreid and

s.ser_id=cd.cdr_servicetypeid and

d.dis_discontinued=i.IEL_Discontinued and m.mhb_discontinued=i.IEL_Discontinued and

cd.cdr_discontinued=i.IEL_Discontinued and i.IEL_Discontinued=0 and

--cd.cdr_reporttype='C' and

cd.cdr_remailcentreid= isnull(null, cd.cdr_remailcentreid )and

cd.cdr_remailcentreid in (select mhb_id from mos_MailHub with(nolock) where mhb_discontinued=0 and mhb_countryid=isnull(null,mhb_countryid))and

cd.cdr_origincentreid=isnull(null, cd.cdr_origincentreid )and

cd.cdr_origincentreid in (select mhb_id from mos_MailHub with(nolock) where mhb_discontinued=0 and mhb_countryid=isnull(null,mhb_countryid)) and

convert(varchar(12),cd.cdr_reportingfrom,101)>= convert(varchar(12),convert(datetime,'1/1/2009'),101) and

convert(varchar(12),cd.cdr_reportingto,101)<=convert(varchar(12),convert(datetime,'12/31/2009'),101)

group by cd.cdr_reporttype,m.mhb_code having cdr_reporttype='C'

union

select

cd.cdr_reporttype, mo.mhb_code,sum(cast(round((cd.cdr_Postage*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3))) as postage,

sum(cast(round((cd.cdr_HandlingCost*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3))) as HandlingCost,

sum(cast(round((cd.cdr_TranshipmentLH*dbo.fn_CurrencyUnit('CUR0005')),3)as decimal(15,3))) as Tanat_LH,

sum(cast(round((cd.cdr_Postage*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3)))+

sum(cast(round((cd.cdr_HandlingCost*dbo.fn_CurrencyUnit('CUR0005')),3) as decimal(15,3)))+

sum(cast(round((cd.cdr_TranshipmentLH*dbo.fn_CurrencyUnit('CUR0005')),3)as decimal(15,3))) as TotalCosts

from

mos_IEL i with(nolock),mos_DisposalCode d with(nolock),mos_MailHub m with(nolock),mos_MailHub mo with(nolock),

mos_cdreport cd with(nolock),mos_servicetype s with(nolock)

where

cd.cdr_id=isnull(null,cd.cdr_id) and

i.IEL_IELNumber=cd.cdr_IELNumber and

cd.cdr_disposalid=d.dis_id and m.mhb_id=cd.cdr_remailcentreid and

mo.mhb_id=cd.cdr_origincentreid and

s.ser_id=cd.cdr_servicetypeid and

d.dis_discontinued=i.IEL_Discontinued and m.mhb_discontinued=i.IEL_Discontinued and

cd.cdr_discontinued=i.IEL_Discontinued and i.IEL_Discontinued=0 and

cd.cdr_remailcentreid= isnull(null, cd.cdr_remailcentreid )and

cd.cdr_remailcentreid in (select mhb_id from mos_MailHub with(nolock) where mhb_discontinued=0 and mhb_countryid=isnull(null,mhb_countryid))and

cd.cdr_origincentreid=isnull(null, cd.cdr_origincentreid )and

cd.cdr_origincentreid in (select mhb_id from mos_MailHub with(nolock) where mhb_discontinued=0 and mhb_countryid=isnull(null,mhb_countryid)) and

convert(varchar(12),cd.cdr_reportingfrom,101)>= convert(varchar(12),convert(datetime,'1/1/2009'),101) and

convert(varchar(12),cd.cdr_reportingto,101)<=convert(varchar(12),convert(datetime,'12/31/2009'),101)

group by cd.cdr_reporttype,mo.mhb_code having cdr_reporttype='D'

--order by cd.cdr_reporttype, m.mhb_code

this is query i am formed.
but result is below
C KUL 0.000 2.974 0.000 2.974
C MAA 0.000 4.038 0.000 4.038
C SGM 0.000 1.782 0.000 1.782
C SYD 5.511 8.786 66.259 80.556
D AKL 0.000 1.782 0.000 1.782
D HKG 0.000 0.000 66.259 66.259
D SGM 5.511 15.798 0.000 21.309
how to display this report.
Please Help Me
IP IP Logged
kamsri153
Newbie
Newbie
Avatar

Joined: 26 May 2009
Location: India
Online Status: Offline
Posts: 17
Quote kamsri153 Replybullet Posted: 12 Jun 2009 at 10:20am
I am using this below code to export
child.CR_DCRViewer.ShowExportButton = True
 
 BUt i am want to allow user only pdf format only.other options has to prevent. is it possible.
Please Help me.
 
IP IP Logged
<< Prev  Page  of 2
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