Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: error reports Post Reply Post New Topic
Author Message
Binabik1978
Newbie
Newbie


Joined: 31 Aug 2014
Location: Spain
Online Status: Offline
Posts: 1
Quote Binabik1978 Replybullet Topic: error reports
    Posted: 09 Sep 2014 at 12:57am


Hello, I have two reports of crystal report that when I open from the program called Gesticom who opens the report and then print out one me this error:


Failed to retrieve data from the database. Details: [Database Vendor Code: 102]

and on the other:

Failed to retrieve data from the database. Details: [Database Vendor Code: 4104]

These reports before upgrading Gesticom program and the version of sql from 2005 to 2012 worked properly.

I get has to do a check of the database reporting and makes me repairing some boards down to get the database is now up to date.

Then I do a SQL query and displays Show me the following query:


SELECT "Articulos"."CodAtri2", "SerAtri"."CODVAL01", "SerAtri"."CODVAL02", "SerAtri"."CODVAL03", "SerAtri"."CODVAL04", "SerAtri"."CODVAL05", "SerAtri"."CODVAL06", "SerAtri"."CODVAL07", "SerAtri"."CODVAL08", "SerAtri"."CODVAL09", "SerAtri"."CODVAL10", "SerAtri"."CODVAL11", "SerAtri"."CODVAL12", "SerAtri"."CODVAL13", "SerAtri"."CODVAL14", "SerAtri"."CODVAL15", "SerAtri"."CODVAL16", "SerAtri"."CODVAL17", "SerAtri"."CODVAL18", "SerAtri"."CODVAL19", "SerAtri"."CODVAL20", "SerAtri"."CODVAL21", "SerAtri"."CODVAL22", "SerAtri"."CODVAL23", "SerAtri"."CODVAL24", "SerAtri"."CODVAL25", "SerAtri"."CODVAL26", "SerAtri"."CODVAL27", "SerAtri"."CODVAL28", "SerAtri"."CODVAL29", "SerAtri"."CODVAL30", "ForPago"."DesPago", "ForPago"."NumPago", "ForPago"."PriPago", "CabPreCli"."CodPed", "LinPreCli"."CodArt", "LinPreCli"."DesArt", "LinPreCli"."Cantidad", "LinPreCli"."Precio", "LinPreCli"."Dto", "LinPreCli"."Total", "LinPreCli"."LinPed", "ComPreCli"."ValAtri2", "LinPreCli"."ObsLin", "CabPreCli"."ObsPed", "ComPreCli"."ValAtri1", "ComPreCli"."Cantidad", "CabPreCli"."SubTot", "CabPreCli"."BasImp", "CabPreCli"."ImpIva", "CabPreCli"."Total", "CabPreCli"."FecPed", "CabPreCli"."CifCli", "CabPreCli"."DirEnvio", "CabPreCli"."NomCli", "CabPreCli"."CodCli", "Articulos"."ObsArt"
FROM GESTICOM.dbo.CabPreCli CabPreCli, GESTICOM.dbo. LinPreCli LinPreCli, GESTICOM.dbo.ForPago ForPago, GESTICOM.dbo.Clientes Clientes, GESTICOM.dbo.ComPreCli ComPreCli, GESTICOM.dbo.Articulos Articulos, GESTICOM.dbo.SerAtri SerAtri
WHERE CabPreCli.CodSer = LinPreCli.CodSer AND CabPreCli.CodEje = LinPreCli.CodEje AND CabPreCli.CodPed = LinPreCli.CodPed AND CabPreCli.CodPago = ForPago.CodPago AND CabPreCli.CodCli = Clientes.CodCli AND LinPreCli.CodSer = ComPreCli.CodSer AND LinPreCli.CodEje = ComPreCli.CodEje AND LinPreCli.CodPed =ComPreCli.CodPed AND LinPreCli.LinPed = ComPreCli.LinPed AND ComPreCli.CodArt = Articulos.CodArt AND Articulos.CodAtri1 *= SerAtri.CodAtri AND Articulos.SerAtri1 *= SerAtri.CodSerAtri
ORDER BY CabPreCli.CodPed ASC, LinPreCli.LinPed ASC, ComPreCli.ValAtri2 ASC


Execute this statement in the SQL Analyzer 2012 and tells me there is a syntax error * =

As I see in consultation believe that the error is in this asterisk.

But do not know how I can change this sql query in the report.

I have the crystal report 9.2.

How I can change the sql query that generates the report me?

How I can repair these reports ?.

Thank you very much.

A greeting.








IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet Posted: 09 Sep 2014 at 2:20am
*= mean left outer join. As you can see in the FROM section each table is listed without a join. This is done through the where condition.
 
You are using an old version of CR so not sure if it is this? or how the db connection has been setup.
 
I assume 2012 does not support this legacy function anymore? I am using 2005 and it works fine.
 
Hope someone else can give you more answers.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 09 Sep 2014 at 8:28am
the standard format would be something like this


SELECT "Articulos"."CodAtri2"
    ,"SerAtri"."CODVAL01"
    ,"SerAtri"."CODVAL02"
    ,"SerAtri"."CODVAL03"
    ,"SerAtri"."CODVAL04"
    ,"SerAtri"."CODVAL05"
    ,"SerAtri"."CODVAL06"
    ,"SerAtri"."CODVAL07"
    ,"SerAtri"."CODVAL08"
    ,"SerAtri"."CODVAL09"
    ,"SerAtri"."CODVAL10"
    ,"SerAtri"."CODVAL11"
    ,"SerAtri"."CODVAL12"
    ,"SerAtri"."CODVAL13"
    ,"SerAtri"."CODVAL14"
    ,"SerAtri"."CODVAL15"
    ,"SerAtri"."CODVAL16"
    ,"SerAtri"."CODVAL17"
    ,"SerAtri"."CODVAL18"
    ,"SerAtri"."CODVAL19"
    ,"SerAtri"."CODVAL20"
    ,"SerAtri"."CODVAL21"
    ,"SerAtri"."CODVAL22"
    ,"SerAtri"."CODVAL23"
    ,"SerAtri"."CODVAL24"
    ,"SerAtri"."CODVAL25"
    ,"SerAtri"."CODVAL26"
    ,"SerAtri"."CODVAL27"
    ,"SerAtri"."CODVAL28"
    ,"SerAtri"."CODVAL29"
    ,"SerAtri"."CODVAL30"
    ,"ForPago"."DesPago"
    ,"ForPago"."NumPago"
    ,"ForPago"."PriPago"
    ,"CabPreCli"."CodPed"
    ,"LinPreCli"."CodArt"
    ,"LinPreCli"."DesArt"
    ,"LinPreCli"."Cantidad"
    ,"LinPreCli"."Precio"
    ,"LinPreCli"."Dto"
    ,"LinPreCli"."Total"
    ,"LinPreCli"."LinPed"
    ,"ComPreCli"."ValAtri2"
    ,"LinPreCli"."ObsLin"
    ,"CabPreCli"."ObsPed"
    ,"ComPreCli"."ValAtri1"
    ,"ComPreCli"."Cantidad"
    ,"CabPreCli"."SubTot"
    ,"CabPreCli"."BasImp"
    ,"CabPreCli"."ImpIva"
    ,"CabPreCli"."Total"
    ,"CabPreCli"."FecPed"
    ,"CabPreCli"."CifCli"
    ,"CabPreCli"."DirEnvio"
    ,"CabPreCli"."NomCli"
    ,"CabPreCli"."CodCli"
    ,"Articulos"."ObsArt"
FROM GESTICOM.dbo.CabPreCli CabPreCli
on CabPreCli.CodSer = LinPreCli.CodSer
    join GESTICOM.dbo.LinPreCli LinPreCli
on CabPreCli.CodEje = LinPreCli.CodEje
and CabPreCli.CodPed = LinPreCli.CodPed
    join GESTICOM.dbo.ForPago ForPago
on CabPreCli.CodPago = ForPago.CodPago
    join GESTICOM.dbo.Clientes Clientes
on CabPreCli.CodCli = Clientes.CodCli
    join GESTICOM.dbo.ComPreCli ComPreCli
on LinPreCli.CodSer = ComPreCli.CodSer
and LinPreCli.CodEje = ComPreCli.CodEje   
and LinPreCli.CodPed = ComPreCli.CodPed   
and LinPreCli.LinPed = ComPreCli.LinPed   
    join GESTICOM.dbo.Articulos Articulos
on ComPreCli.CodArt = Articulos.CodArt
    left join GESTICOM.dbo.SerAtri SerAtri
on Articulos.CodAtri1 = SerAtri.CodAtri
AND Articulos.SerAtri1 = SerAtri.CodSerAtri
ORDER BY CabPreCli.CodPed ASC
    ,LinPreCli.LinPed ASC
    ,ComPreCli.ValAtri2 ASC
 
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.016 seconds.