Home End User

Problem Linking 2 Datasets

edited January 2011 in End User
Hi

RBEnt 12.03, Delphi 2007, Advantage Data, Windows 7

I have a report that was working ok in an earlier version of ReportBuilder
but is now causing a problem (although i have found a fix). There are two
datasets; Stock and StockMovements. The Sql for the tables are as follows:

SELECT Stock.StockNo, Stock.Description
FROM Stock Stock
ORDER BY Stock.StockNo

SELECT Stockmove.StockNo, SUM(Stockmove.Qty) AS SUM_Stockmove_Qty
FROM Stockmove Stockmove
GROUP BY Stockmove.StockNo

The two tables are linked by the StockNo field. After linking and
previewing the StockMovements data I am getting an sql error saying Table or
Alias Stock can not be found. Prior to linking both datasets work fine.
Changing the link settings makes no difference. If I remove the calculated
field in Stockmove then there is no problem and everything works fine. If I
modify the first data set by adding in an additional sort field then it all
works ok again. Weird!

SELECT Stock.StockNo, Stock.Description
FROM Stock Stock
ORDER BY Stock.StockNo, Stock.Description

Why adding the second sort field fixes the problem i do not know but clearly
something is going wrong in the preparation of the linked sql. A number of
years ago there used to be a key combination that would allow the linked sql
query to be displayed but I have forgotten it. Does anyone know what it is
so that I can continue the investigation.


Regards

Tim Murfitt

Comments

  • edited January 2011
    To view the linking SQL, use ctrl + left mouse while positioned over the
    dataview tool window.

    I just emailed you a patch to RB 12.03 that I think might resolve the issue
    you are reporting.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2011
    Nard

    Your patch has fixed the problem. Thanks very much.

    Regards

    Tim


  • edited January 2011


    Can I have it too please Nard, I have the same configuration.

    Regards,

    Ian
  • edited January 2011
    I emailed you the patch. Registered RB 12.03 customers can email support@
    and request the patch.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.