Solved

Take User input in crystal

Posted on 2007-04-03
10
140 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 100

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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 100

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 100

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 100

Accepted Solution

by:
mlmcc earned 500 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 100

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 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