?
Solved

crystal reports - dynamic parameter

Posted on 2013-06-06
9
Medium Priority
?
445 Views
Last Modified: 2013-06-12
I am adding a dynamic parameter to a report. I select a field for the value, then select a field for the description.  The problem I have is: When I run the report and select a parameter from mt list it brings in both the vale and the description. The value is a number, the description is a date. It pulls it in as 962 - 2013-05-25 00:00:00. Then gives me an error saying a number is required.
0
Comment
Question by:qbjgqbjg
[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
  • 6
  • 3
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39227065
Where are you using the parameter?

Can you show the formula?

I just built one the same way and don't have a problem
What version of Crystal?

mlmcc
0
 

Author Comment

by:qbjgqbjg
ID: 39227213
XI, The parameter is used in selection formula.
{ESGACTTR.ACCT_TYPE} = "E" and
({@dept} = {?Dept} or {?Dept} = '*') and
({@div} = {?Div}   or {?Div} = '*') and
({@act} = {?Act}   or {?Act} = '*') and
({@obj} = {?Obj}   or {?Obj} = '*') and
({@Fund} = {?Fund} or {?Fund} = '*') and
{ESGACTTR.ACCT_YEAR} = {?FiscalYear} and
{ESXTRANR.DOC_DATE} in {@DateBegin} to {@DateEnd} and
{CmdPayPer.PAY_PERIOD} = {?PayPeriod} and
{CmdPayPer.FISCAL_YEAR} = {?FiscalYear}
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39227255
Which parameter?

Can you show a screen shot of the parameter edit screen?

mlmcc
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:qbjgqbjg
ID: 39227328
I changed it a little. I tried making it a string. I hoped that would make  difference but it doesn't. It still makes the description part of the parameter. I have used dynamic before and it worked correctly. Is there a setting for this? Here is a screen shot of the definition and how it comes up.Doc1.docx
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39227411
What data type is PayPeriod?

The parameter type is controlled by the field you choose.

Does it change the type when you choose the data field?

Try a verify database

mlmcc
0
 

Author Comment

by:qbjgqbjg
ID: 39227435
In the original file it is numeric, so it automatically made it numeric and description is a date. I was using a sql command to select a subset of my table to use for the dynamic parameter. So I added 2 additional  fields, one for pay period changed to a string and 1 for the date with just the date(without the time). But neither way works. If I wanted it to bring in the description I would not know what to do to make it do that.This is the command
SELECT
 ESYPPERD.PAY_PERIOD
 , ESYPPERD.PAY_YEAR
 , ESYPPERD.END_DATE
 , ESYPPERD.START_DATE
 , ESYPPERD.CYCLE_CODE
 , ESYPPERD.FISCAL_YEAR
 , CONVERT(VARCHAR(10),ESYPPERD.END_DATE,110) as EndDate
 , CAST( ESYPPERD.PAY_PERIOD as VARCHAR(4)) as PayPeriod
 
 FROM   ESYPPERD ESYPPERD
 
 WHERE  ESYPPERD.CYCLE_CODE = 'b'
 AND ESYPPERD.FISCAL_YEAR =  {?FiscalYear}
AND ESYPPERD.END_DATE <= GETDATE()

ORDER BY
 ESYPPERD.START_DATE
,  ESYPPERD.PAY_PERIOD
0
 

Author Comment

by:qbjgqbjg
ID: 39227454
Even if this had worked with the parameter I would have to convert it back to a number to use it in the report. I was just trying to see if being a string would make it work correctly. Here is the data pulled by the sql for the command. PayPeriods.xlsx
0
 

Accepted Solution

by:
qbjgqbjg earned 0 total points
ID: 39229264
Since there does not seem to be a way to make this work, I have decided to do this report without using the Dynamic parameter and just have them enter pay period without selecting it.
0
 

Author Closing Comment

by:qbjgqbjg
ID: 39240409
There was no solution, so I am going to do it another way.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

777 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