on 03-17-2011 9:31 PM
Hi.
I have a layut in Crystal.
This report uses 2 views. PrintOinvHeader and PrintInv1Lines
when i use fields from first view everything is ok.
When i add line form view 2'nd to the report i have this error and next one
Canot detremine the queries necessary to get data from this report
Hi.
what do you mean by "join the 2 views on docentry in CR."
In first option there was no entry in views "(t0.DocEntry = 4500)
and docentry was a parametr.
I also have this two views linked by docentry
What else i can do in CR?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it means that for CR your 2 views are not SQL steady, or your linking is not right.
Try this:
Create a command as a datasource with something like:
Select * from PrintOinvHeader t0 inner join PrintInv1Lines t1 on "herecomes your join".
I (and probably we) can't help you any more, without knowing the exact 2 queries behind your views.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. there are those scripts
USE [BAZA2]
GO
/****** Object: View [dbo].[PrintInv1Lines] Script Date: 04/05/2011 14:50:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[PrintInv1Lines]
AS
SELECT t0.DocEntry, t0.ItemCode, t0.Dscription, t0.Price, t0.PriceBefDi, t0.PriceAfVAT, t0.DiscPrcnt, t0.LineTotal, t0.LineVat, t0.Currency, t0.VatSumFrgn, t0.LineVatlF,
t0.VatGroup, t0.VatPrcnt, t0.unitMsr
FROM dbo.INV1 AS t0 INNER JOIN
dbo.OITM AS t1 ON t1.ItemCode = t0.ItemCode
WHERE (t0.DocEntry = 4500)
USE [BAZA2]
GO
/****** Object: View [dbo].[PrintOinvHeader] Script Date: 04/05/2011 14:50:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[PrintOinvHeader]
AS
SELECT t0.DocEntry, t0.DocNum, t0.DocDate, t0.TaxDate, t0.DocDueDate, t1.CardCode, t1.CardName, t2.PymntGroup, t0.ObjType, t0.Address, t1.LicTradNum
FROM dbo.OINV AS t0 INNER JOIN
dbo.OCRD AS t1 ON t1.CardCode = t0.CardCode INNER JOIN
dbo.OCTG AS t2 ON t2.GroupNum = t0.GroupNum
WHERE (t0.DocEntry = 4500)
Lukasz,
why don't you use 1 view instead?
0USE BAZA2
GO
/****** Object: View dbo.PrintInv1Lines Script Date: 04/05/2011 14:50:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW dbo.PrintInv1Lines
AS
SELECT t0.DocEntry, t0.ItemCode, t0.Dscription, t0.Price, t0.PriceBefDi, t0.PriceAfVAT, t0.DiscPrcnt, t0.LineTotal, t0.LineVat, t0.Currency, t0.VatSumFrgn, t0.LineVatlF,
t0.VatGroup, t0.VatPrcnt, t0.unitMsr
,
t2.DocEntry, t2.DocNum, t2.DocDate, t2.TaxDate, t2.DocDueDate, t2.CardCode, t2.CardName, t4.PymntGroup, t2.ObjType, t2.Address, t3.LicTradNum
FROM dbo.INV1 AS t0 INNER JOIN
inner join dbo.oinv as t2 on t0.docentry=t2.docentry
inner join
dbo.OCRD AS t3 ON t2.CardCode = t3.CardCode INNER JOIN
dbo.OCTG AS t4 ON t2.GroupNum = t4.GroupNum
dbo.OITM AS t1 ON t1.ItemCode = t0.ItemCode
WHERE (t0.DocEntry = 4500)
or
join the 2 views on docentry in CR.
User | Count |
---|---|
92 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.