Quantcast
Channel: SCN: Message List - Reporting and Printing
Viewing all 2719 articles
Browse latest View live

CR 2008 - Can we make a parameter prompt optional if datasource is a stored procedure?

$
0
0

Hi everybody!

 

I use Crystal Report 2008 to develop reports which use an SQL stored procedure as datasource.

 

I always run my crystal reports from within SAP B1 ver.8 (Preview External Crystal Reports)

 

I often make good use of optional parameters in CR2008, by setting Optional Prompt = True in the Edit Parameter screen.

And it works, provided the parameter is created in CR2008.

 

-----------

 

But if the parameter is picked up from the stored procedure (e.g

 

          ALTER procedure [dbo].[usp_101]  @Project nvarchar(15), etc),

 

I cannot set Optional Prompt = True. The option is greyed.

 

 

Is there any way I can make prompts optional by modifying my stored procedure?

 

 

Thanks

Leon Lai


Parent account key name/description in report

$
0
0

Hi Experts!

 

So here is the code where i am retrieving postings detail (invoice rows, BP, system amount, doc number, distribution rule and project)

 

 

Declare @FromDate Datetime

Declare @ToDate Datetime

 

Set @FromDate = (Select min(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate]>='[%1]')

Set @ToDate = (Select max(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate] <='[%2]')

 

SELECT T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription], T2.[groupmask], T2.[FatherNum], T1.[AcctCode], T2.[AcctName], T1.[OcrCode], T1.[Project], T1.[TotalSumSy], T0.[Comments]

 

FROM

OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN OACT T2 ON T1.AcctCode = T2.AcctCode

 

WHERE

T0.[TaxDate] >= @FromDate

AND T0.[TaxDate] <= @ToDate

AND T2.[groupmask] >= 4

 

My issue is that i want to have for each account the parent account code and the parent account description. (as well as the Group mask name/description)

 

How can i do that?

Re: Parent account key name/description in report

$
0
0

Hi,

 

Are you looking for this:

 

Declare @FromDate Datetime

Declare @ToDate Datetime

 

Set @FromDate = (Select min(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate]>='[%1]')

Set @ToDate = (Select max(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate] <='[%2]')

 

SELECT T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription], T2.[groupmask], T2.[FatherNum], T1.[AcctCode], T2.[AcctName], T2.[FormatCode], T1.[OcrCode], T1.[Project], T1.[TotalSumSy], T0.[Comments]

 

FROM

OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN OACT T2 ON T1.AcctCode = T2.AcctCode

 

WHERE

T0.[TaxDate] >= @FromDate

AND T0.[TaxDate] <= @ToDate

AND T2.[groupmask] >= 4

 

Thanks & Regards,

Nagarajan

Re: Inventory Query with movement and multiple selections

$
0
0

Hi,

 

1. how to remove the first row which is always blank?

 

Please highlight in your query result

 

2. 2. i want to have the choice to select one specific warehouse or all, one specific Item group or all, one specific and one specific Item code or all?

 

It is not possible to use such option. Since you are taking max values from tables. Further if you remove max condition, sure above query will pop with error message like sub query returns more than one value

 

3. this may sound stupid but i can't manage to add as well the inventory UoM?

 

Yes can add from OITM table, field T0.[InvntryUom]

 

Thanks & Regards,

Nagarajan

Choose Printing Start Page Number

$
0
0

Hi all,

 

 

can I include in parameters for report Balance an option where can I choose the number for start page?

 

I see in the Diary Journal Report this option and I want do same in Balance Accounts report...

 

 

Regards

Re: Default Warehouse Qty Question

$
0
0

Hi,

 

Try this query to get default ware house and its quantity and modify above query.

 

SELECT T0.[ItemCode], T0.[WhsCode], T0.[OnHand] FROM OITW T0  INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[WhsCode] =  T1.[DfltWH] and  T1.[ItemCode]  = [%0]

 

Thanks & Regards,

Nagarajan

Re: Parent account key name/description in report

$
0
0

Not quite, yours just add one more time the account.

What i want is the query to retrieve the Groupmaks name/description (T2.[groupmask]) and more importantly the Parent account name/description (T2.[FatherNum]).

 

The other thing i notice is that actually i am only taking into account the AP invoice but i would like to retrieve all kind of docs JE, AP credit memo, AR and AR credit memo and this is far beyong my expertise i am afraid...

I think i have to call it from the Journal entries and then link it to AP and AR doc eventually to retrieve the row details but pffffff maybe in a few years i ll succeed!

=> basically it is like a G/L report but with row details...

Re: Inventory Query with movement and multiple selections

$
0
0

Dear Nagarajan

 

See below:

 

#WarehouseItem No.Item DescPrice in CZKOpening BalanceINOUTClosing
1WH100000
2WH13SPxxxxxx104.91080000
3WH13S 2Pxxxxxx299.83220000
4WH1COMP1000Pxxxxxx30.2210000

 

For the UoM form OITM, i can't seem to grasp the logic, when i just add your text, it is not working...

 

Now regarding the Item Group, i have managed to change the code as follow, no issue. But for the warehouse since i want the warehouse to appear in first column i do not know how to do:

 

Declare @Whse nvarchar(10)
Declare @FromDate DateTime
Declare @ToDate DateTime
Declare @Group1 nvarchar(10)
Declare @Group2 nvarchar(10)
Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
Set @Group1 = (Select min(s2.ItmsGrpCod) from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]' )
Set @Group2 = (Select max(s3.ItmsGrpCod) from dbo.OITB S3 Where S3.ItmsGrpNam = '[%3]')
Set @Whse = (Select max(s4.Warehouse) from dbo.OINM S4 Where S4.Warehouse = '[%4]')
Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as 'Item Desc',max(a.Price) as 'Price in CZK', sum(a.[Opening Balance]) as [Opening Balance], sum(a.[IN]) as [IN], sum(a.OUT) as OUT, ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing from dbo.OITM I1 Left JOIN (Select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.Price, (sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance], 0 as [IN], 0 as OUT
From dbo.OINM N1
Where N1.DocDate < @FromDate and N1.Warehouse = @Whse
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.Price
Union All
select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.price, 0 as [Opening Balance], sum(N1.inqty) as [IN], 0 as OUT
From dbo.OINM N1
Where N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and N1.Inqty >0 and N1.Warehouse = @Whse
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price
Union All
select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.price, 0 as [Opening Balance], 0 as [IN], sum(N1.outqty) as OUT
From dbo.OINM N1
Where N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and N1.OutQty > 0 and N1.Warehouse = @Whse
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price) a ON a.ItemCode=I1.ItemCode
where  I1.ItmsGrpCod >= @Group1 and I1.ItmsGrpCod <= @Group2
Group By a.Itemcode
Order By a.Itemcode

Re: Inventory Query with movement and multiple selections

$
0
0

Dear Mr. Nicolas Constant,

 

Please refer above query. i might be satisfy your requirement.

 

Select LocType, LocCode, ItemCode, Sum(InQTY - OutQty) as CloseStock

From OIVL

Where DocDate <= {?ToDate}  And ItemCode In {?Items@Select * From OITM}

Group by LocType, LocCode, ItemCode

 

 

Select LocType, LocCode, ItemCode, Sum(OutQty) as IssueQty

From OIVL

Where {?FromDate}<=DocDate and DocDate <= {?ToDate}  And ItemCode in {?Items@Select * From OITM}

Group by LocType, LocCode, ItemCode

 

 

Select LocType, LocCode, ItemCode, max(DocDate ) as LastDate

From OIVL

Where InQty > 0 And DocDate <= DateAdd(y, 1000, {?ToDate})  And ItemCode in {?Items@Select * From OITM}

Group By LocType, LocCode, ItemCode

 

 

SELECT "OWHS"."WhsCode", "OITW"."MinStock", "OITW"."OnHand", "OWHS"."WhsName", "OITW"."ItemCode", "OITW"."WhsCode"

FROM   "TestCompany"."dbo"."OITW" "OITW" INNER JOIN "TestCompany"."dbo"."OWHS" "OWHS" ON "OITW"."WhsCode"="OWHS"."WhsCode"

ORDER BY "OWHS"."WhsCode"

 

 

Select LocType, LocCode, ItemCode, Sum(InQTY - OutQty) as OpenStock

From OIVL

Where DocDate < {?FromDate} And ItemCode in {?Items@Select * From OITM}

Group by LocType, LocCode, ItemCode

 

 

SELECT "OITM"."ItemName", "OITB"."ItmsGrpNam", "OITM"."ByWh", "OITM"."MinLevel", "OITM"."LeadTime", "OITM"."InvntryUom", "OITM"."ItemCode"

FROM   "TestCompany"."dbo"."OITM" "OITM" INNER JOIN "TestCompany"."dbo"."OITB" "OITB" ON "OITM"."ItmsGrpCod"="OITB"."ItmsGrpCod"

 

 

Select MainCurncy,DateFormat,CharMonth, DateSep,TimeFormat,

SumDec, QtyDec, PriceDec, RateDec, PercentDec, DecSep, ThousSep,

CompnyName, LogoFile, LogoImage, MnhlNote

From OADM, OADP

 

Thanks & Regards,

Nishit Makadia

Always asking for parameter in Bill of Material Report

$
0
0

Dear Sir,

 

As per our requirement, we develop an Bill of Material Report in Crystal Report.

 

We develop an Report as an Layout.

 

I used Product Code Number as an Parameter Value.

 

But my problem is when i select that layout from Bill of Material Form.

 

It will always ask for Product Code Number as an parameter.

 

I also set parameter properties as an "Do not Show" but can't work.

 

as per my opinion, i passed String value as an parameter so,

 

it will always ask for enter parameter value.

 

I can't find out the solution.

 

Please help me.

 

Thanks & Regards,

Nishit Makadia

Re: Inventory Query with movement and multiple selections

$
0
0

Hi Nishit

Thanks but this is not working.

When i remove the " and the TestCompany, the result is nothing.

Re: Inventory Query with movement and multiple selections

$
0
0

Hi,

 

Try this query:

 

Declare @Whse nvarchar(10)
Declare @FromDate DateTime
Declare @ToDate DateTime
Declare @Group1 nvarchar(10)
Declare @Group2 nvarchar(10)

Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
Set @Group1 = (Select min(s2.ItmsGrpCod) from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]' )
Set @Group2 = (Select max(s3.ItmsGrpCod) from dbo.OITB S3 Where S3.ItmsGrpNam = '[%3]')
Set @Whse = (Select max(s4.Warehouse) from dbo.OINM S4 Where S4.Warehouse = '[%4]')

Select @Whse as 'Warehouse', a.Itemcode,a.[InvntryUom], max(a.Dscription) as 'Item Desc',max(a.Price) as 'Price in CZK', sum(a.[Opening Balance]) as [Opening Balance], sum(a.[IN]) as [IN], sum(a.OUT) as OUT, ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing

from dbo.OITM I1 Left JOIN (Select N1.Warehouse, N1.Itemcode, T1.[InvntryUom], N1.Dscription,N1.Price, (sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance], 0 as [IN], 0 as OUT
From dbo.OINM N1 left join OITM T1 on t1.itemcode = N1.itemcode
Where N1.DocDate < @FromDate and N1.Warehouse = @Whse
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.Price,T1.[InvntryUom]
Union All

select N1.Warehouse, N1.Itemcode, T1.[InvntryUom],N1.Dscription,N1.price, 0 as [Opening Balance], sum(N1.inqty) as [IN], 0 as OUT
From dbo.OINM N1   left join OITM T1 on t1.itemcode = N1.itemcode
Where N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and N1.Inqty >0 and N1.Warehouse = @Whse 
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price,T1.[InvntryUom]
Union All

select N1.Warehouse, N1.Itemcode, T1.[InvntryUom],N1.Dscription,N1.price, 0 as [Opening Balance], 0 as [IN], sum(N1.outqty) as OUT 
From dbo.OINM N1   left join OITM T1 on t1.itemcode = N1.itemcode
Where N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and N1.OutQty > 0 and N1.Warehouse = @Whse 
Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price,T1.[InvntryUom]) a ON a.ItemCode=I1.ItemCode
where  I1.ItmsGrpCod >= @Group1 and I1.ItmsGrpCod <= @Group2

Group By a.Itemcode,a.[InvntryUom]
Order By a.Itemcode

 

Thanks & Regards,

Nagarajan

Re: Always asking for parameter in Bill of Material Report

$
0
0

Dear Mr. Nagarajan K.

 

I wait for your replay sir....

 

Thanks & Regards,

Nishit Makadia

Re: Inventory Query with movement and multiple selections

Display Common Item Name in Group Header

$
0
0

Dear Experts,

 

Can you please tell me that how i can display common text in particular field in Group Header ?

 

For Example :

 

I have an one Field : ItemName

 

In this ItemName field there are an multiple names are available.

Like,

1) Push Button 2B

2) Xenon Push Button 3B

3) Herier Push Button 4C

 

I want to display "Push Button" as an Group Header.

 

I think you all are understand my exact requirement.

 

Thanks & Regards,

Nishit Makadia


Re: Display Common Item Name in Group Header

$
0
0

HI!

 

are you working with crystal report?

Linking ORDR to POR1 and OPOR.

$
0
0

Hi Experts,

 

    Is there a way to link OPOR and POR1 to ORDR to show ORDR.[CardName]? I want to show the ORDR.[CardName] with the details of OPOR and POR1 in a query.

 

Thanks and Regards,

Christian

Re: Display Common Item Name in Group Header

Re: Linking ORDR to POR1 and OPOR.

$
0
0

Hi,

 

1. Only possible if you create PO directly from SO through procurement document (SO-->Logistics tab).

 

2. If you have common field between ORDR and  OPOR, then you can link these tables.

 

Thanks & Regards,

Nagarajan


Re: Always asking for parameter in Bill of Material Report

$
0
0

Hi,

 

Thanks for understanding problem and encouraging to learn more things.

 

Thanks & Regards,

Nagarajan

 


Viewing all 2719 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>