• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Take User input in crystal

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
ammartahir1978
Asked:
ammartahir1978
  • 5
  • 4
1 Solution
 
mlmccCommented:
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
 
Kurt ReinhardtCommented:
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
 
ammartahir1978Author Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mlmccCommented:
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
 
ammartahir1978Author Commented:
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
 
mlmccCommented:
Where is the trouble?  There really isn't more detail.

mlmcc
0
 
ammartahir1978Author Commented:
the details i am asking is the about the formula you told me above as where to put it.
0
 
mlmccCommented:
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
 
mlmccCommented:
Glad i could help

mlmcc
0
 
ammartahir1978Author Commented:
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!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now