Announcement

Collapse
No announcement yet.

Select Distinct statement is not working in pdfreports

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Select Distinct statement is not working in pdfreports

    I believe I may have located a bug. I need a simple PDF Report application that would pull data from two tables (individual table and marriage table) to create a listing of wedding anniversaries. Because I am needing to retrieve data from two separate records of the same table (husband’s record and wife’s record) to see if each person is still alive before adding them to the anniversary list, my initial attempt at creating the report produced two entries for each family. I then went to the ScriptCase SQL Builder and created a “select distinct” sql statement. This sql produced exactly what I needed (no duplicate records). I pasted that sql statement into my pdfreport application, but it still generated double records of each family. After some experimentation, it became obvious that the pdfreport application was not recognizing the “select distinct” command. It processed it as a simple “select” statement, ignoring the “distinct”.

    How do I get the “select distinct” command to work here? Obviously it works in ScriptCase (in theory), for the ScriptCase SQL Builder recognizes the command and properly executes it.

    Does anyone have any ideas here?

    By the way, I have been wondering about the “SQL Preparation” attribute immediately beneath where one inserts the “SQL Select Statement”. I cannot find any documentation anywhere that explains what this is for and how to use it. Is it possible this could be used to resolve my problem? I have tried populating this area, but it does not appear to do anything, from what I can tell at least.

  • #2
    I found the solution, thanks to Aducom replying to a different issue for someone else. The quickest solution is to create a view using the entire sql statement with the 'select distinct'. Then, in Scriptcase, simply create the pdfreport using that view. i don't know what we all would do without Aducom and his awesome assistance / answers!!!

    Comment


    • #3
      Hello,

      I will ask to our test manager to test this thing out, once he do it I will come back to you.
      Best regards,
      Carlos Lacerda.
      ScriptCase Commercial Manager.

      Skype: carlos.lacerda82
      Email: carlos@scriptcase.net
      Visit our Blog: http://www.scriptcase.net/blog/
      Visit out fan page: http://www.facebook.com/Scriptcase

      Comment

      Working...
      X