Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One variable called 3 times per screen 1

Status
Not open for further replies.

CrystaLv

Technical User
May 12, 2006
121
US
I am having a cool problem.
There is 3 screens for my Report to be attached to.
Only 1 Variable - IDNo but at each screen it has different name - ID, Ind, Cus. So I have to call IDNo for each screen in one SQL statement.
Otherwise I will have to create 3 Reports that are identical and it is very inconvenient because I have tons of Reports and multiplying by 3 it will be 3 ton. Please, help.


I need to call variable in my SQL so it will work like this:
Where ID = "123" or Ind = "" or Cus = ""

when another screen is active
Where ID = "" or Ind = "123" or Cus = ""

and third screen

Where ID = "" or Ind = "" or Cus = "123"


Thanks a lot
 
Hi,
How are you 'attaching' report pages to screens?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
There is a process of deploying Report into 3rd party software.
I am inserting a path to the Report location and uploading parameters that Crystal has.
It is hard to explain without going into lenghty details.

The trick is to write SQL that will give me just one set of records let say 'where ID='123'
and make it to ignore those (Ind and Cus) that aren't filled with request (parameter)those are ="".

 
Try stating the software being used and how one might identify which screen you are in.

If the criteria is different for each screen, then you might need a parameter which states which screen that you are in to apply the appropriate logic, or use 3 different reports with slight differences.

-k
 
I am having Crystal Report that contains 3 parameters.
ID
Ind
Cus
all of those parameters suppose to be in Crystal formula like:
{IDNo}= {@ID}
{IDNo}= {@Ind}
{IDNo}= {@Cus}

When Running Report Parameter window comes up and I have to be able to fill 1 out of 3 parameters and get correct result which would be
'Select* from Table Where IDNo={@ID}'
or
'Select* from Table Where IDNo={@Ind}'
or
'Select* from Table Where IDNo={@Cus}'

If I achieved this result I would then go insert my Report into 3rd party software and state in Parameters section that IDNo is ID, IDNo is Ind and IDNo is Cus.
But each screen has only 1 parameter so it will pick up IDNo no matter what and run Report for this parameter which visualy is different but at back end is the same.

So far I wrote
If {?ID}<>'' then
{?Ind}='' and {?Cus}=''
else
If {?Ind}<>'' then
{?Cus}='' and {?ID}=''
else
If {?Cus}<>'' then
{?ID}='' and {?Ind}=''

which when placed on Report evaluates to True and I am not sure how to use it from that point.

Thanks
 
Hi,
Again, what 3rd party software and have you asked them how to do that with their tool?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I meant post the 3rd party software type... Understand that this is all being driven by the 3rd party software, and you need to be able to determine which screen you are in, or make provisions in the report to allow for this.

Your question is really about HOW the 3rd party software works.

You state "all of those parameters suppose to be in Crystal formula like:", but where si this supposed to be in the report, it's an odd looking record selection formula.

Then near the end you reference 3 different parameters, hwo does that fit in?

If you have 3 different parameters, which is the opposite of what you first stated, try the following in the Report->Selection Formula->Record:


If not(isnull({?ID}))
and
{?ID} <> "" then
{IDNO} = {?ID}
else
If not(isnull({?Cus}))
and
{?Cus} <> "" then
{IDNO} = {?Cus}
else
If not(isnull({?Ind}))
and
{?Ind} <> "" then
{IDNO} = {?Ind}

Hard to say though, it's entirely up to how the coders of the 3rd party product did it, they may be changing formulas within the report depending upon where it was called from.

-k
 
This is seems like exactly what I was looking for. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top