Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Limiting returns Post Reply Post New Topic
Author Message
smccomish
Newbie
Newbie
Avatar

Joined: 10 Sep 2013
Location: United States
Online Status: Offline
Posts: 13
Quote smccomish Replybullet Topic: Limiting returns
     Posted: 03 Oct 2013 at 5:28am
I am creating a report to show what checks were cut on a file. In the one column I have {checks.Payee} limited to (startswith "transfer to file stl09") in another column I have {checks_1.Payee} and I need it to return anything that (startswith "transfer to file stlrem") AND ALSO if there is not a check in that column for "transfer to file stlrem" I need it to be blank. NOW, it is not returning anything in {checks.Payee} IF there is not one in the other column for {Checks_1.Payee} startswith "transfer to file stlrem"

Here is the formula I have now. I am sure it is an easy fix, but I am very new and can't figure it out.


{ORDERS.TitleCo} = 8 and
{Checks.Payee} startswith "transfer to file stl09" and
{Checks.CheckDate} = {?Check Date Filter} and
{Checks_1.Payee} startswith "transfer to file stlrem"

THANKS FOR YOUR HELP!!!!!
Thanks for your help!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Oct 2013 at 5:57am

Can you write a command or stored proc to do this?

You likley outer joined checks to checks_1 but your select statement is making your outer join into an inner join. Just using an "or condition" with isnull might partially correct the issue but I suspect it will still not get all of your rows, other wise you would not need the condition on the checks_1 payee field at all.
if you can alter your source to a command or stored proc you can add a condition on the join from checks to checks_1 to resolve your issue.


Edited by DBlank - 03 Oct 2013 at 5:59am
IP IP Logged
smccomish
Newbie
Newbie
Avatar

Joined: 10 Sep 2013
Location: United States
Online Status: Offline
Posts: 13
Quote smccomish Replybullet Posted: 07 Oct 2013 at 7:20am
I am sorry. I am very new and have had to teach myself this program. I do not understand what you mean.
Thanks for your help!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2013 at 8:05am
a report needs a data source. there are different source types. based only on the way you worded your question i am assuming that you are using tables and then making the join on the tables in the crystal database expert.
a few other options are to write a crystal command which is basically like a sql stored procedure or view. or if your db rights allow you you can create a view or stored proc in your source database and use that for the report.
 
i was suggesting these as possible solutions because (again a guess) it looks like your select statement and joins are competing. it is not easy to rectify that.
here is a link I found that explains the difference in the placing a condition in the WHERE clause or on the join
 
IP IP Logged
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