[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

promptex not working for my report

Posted on 2006-07-05
7
Medium Priority
?
429 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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 200 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

834 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