Solved

promptex not working for my report

Posted on 2006-07-05
7
425 Views
Last Modified: 2012-06-21
I am having a problem passing arguments to my report. This is basically the link that is being used:
http://crs99/test/viewrpt.cwr?id=487811&init=actx:connect&apsauthtype=secWindowsNT&promptex-parWorkPackage_ID='5399'&promptex-parStartDate='06/01/2006'&promptex-parEndDate='10/07/2006'

Note that all 3 of the parameters are created in the report and parStartDate and parEndDate are Date values. The problem is it is still prompting me for the parameters when I run it.  What am I doing wrong? Thanks in advance.
0
Comment
Question by:mathew_s
  • 4
  • 3
7 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 17045537
Try promptex-0=5399&promptex-1=....etc...
0
 
LVL 1

Author Comment

by:mathew_s
ID: 17045693
It still asks me to provide a value for parStartDate then parEndDate and finally parWorkPackage_ID. Is there something I have to do with the parameters in the report?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17045734
It's been quite a while since I've passed anything in a URL but if I remember correctly I never did get dates to work as dates.  I had to use text-type parameters in Crystal and pass the date as text and then within Crystal convert from text to a date.  You might want to give that a try.

Also, what is the datatype for package ID parameter in Crystal?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:mathew_s
ID: 17045756
parWorkPackage_ID is a number. I will try what you suggest...
0
 
LVL 1

Author Comment

by:mathew_s
ID: 17045938
OK. I changed my date parameters to string parameters and changed my selection formula. Now I get the following error.

------------------
Error in formula <Record Selection>/
'({parWorkPackage_ID}={T_Proposals.WorkPackage_ID}) and
'

Bad date format string.

-------------------
T_Proposals.WorkPackage_ID is an integer in the database.

This is the url I am using now:

http://crs99/test/viewrpt.cwr?id=491529&init=actx:connect&apsauthtype=secWindowsNT&promptex-parWorkPackage_ID=5399&promptex-parStartDate='06/01/2006'&promptex-parEndDate='10/07/2006'

Here is the selection formula:

({?parWorkPackage_ID} = {T_Proposals.WorkPackage_ID}) and
({ACR_Tasks_0607.proposed_start_date}>=CDate({?parStartDate}) and {ACR_Tasks_0607.proposed_start_date}<=CDate({?parEndDate})) OR
({ACR_Tasks_0607.proposed_end_date}>=CDate({?parStartDate}) and {ACR_Tasks_0607.proposed_end_date}>=CDate({?parEndDate}))
0
 
LVL 42

Accepted Solution

by:
frodoman earned 50 total points
ID: 17046031
I would try it without the single quotes:  promptex-parStartDate=06/01/2006&promptex...

I believe everything in the URL is treated as text automatically so your Crystal formula is probably trying to do a CDate conversion including the quote marks.
0
 
LVL 1

Author Comment

by:mathew_s
ID: 17046101
Thank you!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VS2010 and Crystal Reports Loading Image at runtime 8 85
Mask on Parameter CR2008 28 71
business objects to connect to MSSQL 6 104
Summarizing a percent by a grouped category 14 36
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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