?
Solved

Take User input in crystal

Posted on 2007-04-03
10
Medium Priority
?
144 Views
Last Modified: 2010-04-30
Hi everyone,

I have a SQL query and i was working with the crystal by adding a command
but apparently it not giving me correct results in crystal
 here is the query

select  ph.txn_date_time as DATE_TIME,
        (select branch_desc from branch where branch_id = ph.branch_id) as Branch_Name,
      Pd.original_cp,
      pd.current_cp,
      pd.last_cp,
      psd.value,
      psd.vat_rate,
      psd.vat_value,
 psd.sold_value,
 psd.sku,
 pm.alt_code1 as Style,
      al.level1_desc,
      al.level2_desc,
      al.level3_desc,
      al.level_desc,
      al.level_desc_short



from    pm_trans_header ph,
        pm_trans_sku_details psd,
--        ss_users ssu,
        product_master pm,
        product_detail pd,
             anal_level al

where ph.receipt_id = psd.receipt_id
--and   psd.salesperson_id = ssu.id
and   psd.sku_id = pd.sku_id
and   pd.product_id = pm.prod_id
and   al.j_code = pm.j_code_link
and   al.level_no = 4
and   txn_date_time between '01-01-2007 00:00:00.000' and '27-01-2007 23:59:59.999'
and   (pm.alt_code1 like '41%' or pm.alt_code1 like '40%')
and   ph.flag = 1
and   ph.transaction_void = 0
and   psd.flag = 1
order by Branch_name,date_time


now when i cherry pick and put a new data in it gives wroong answer can some one help and let me know how to correct it?

Regards,
0
Comment
Question by:ammartahir1978
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 18843553
How are you putting new data in?  

Are you changing the where clause?

What happens if you refresh the report?

Check if you have data saved with the report.
open the report
Click FILE --> REPORT OPTIONS
Ensure SAVE DATA WITH REPORT is not checked

mlmcc
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 18843709
It would help if you would state what is wrong about the data.  The query, in general, looks fine.  Since I don't know what's wrong, however, I don't know what to look for.

~Kurt
0
 

Author Comment

by:ammartahir1978
ID: 18843772
i have unchecked it,

what  i want is the query i publish above is the query which gives me correct results in QUERY ANALYSER but when i run it in Crystall Report it gives like 8000 + pages which i dont understand as i am new to crystal, also how can i prompt to take date from user instead of hard coding it
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 101

Expert Comment

by:mlmcc
ID: 18844575
In Crystal

Display the FIELD INSERTION
Clcik PARAMETER
Click NEW (May have to right click)
Fill in the prompts
Name - StartDate
Type - Date

Repeat
Name - EndDate

In the REPORT --> SELECT EXPERT
Use a fromula
{txn_date_time} IN DateTime({?StarDate}, Time(0,0,0)) TO DateTime({?EndDate},Time(23,59,59))

mlmcc
0
 

Author Comment

by:ammartahir1978
ID: 18844632
hi Mlmcc

Thanks for this but i think you have to help me out in detail as i am very very new to crystal
dont even know where to get what i will really appreciate if you can guide me through step by step


Thanks a million


Regards,

Ammar Tahir
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 18845844
Where is the trouble?  There really isn't more detail.

mlmcc
0
 

Author Comment

by:ammartahir1978
ID: 18881053
the details i am asking is the about the formula you told me above as where to put it.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 18882417
The selection formula?

CLick REPORT --> SELECT EXPERT
Click SHOW FORMULA
Click FORMULA EDITOR
Enter the formula - you can select the fields and parameters from the "trees"

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 18917409
Glad i could help

mlmcc
0
 

Author Comment

by:ammartahir1978
ID: 18918160
you did thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question