Solved

Take User input in crystal

Posted on 2007-04-03
10
141 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
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.

 
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 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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

707 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