Solved

crystal reports - dynamic parameter

Posted on 2013-06-06
9
432 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
  • 6
  • 3
9 Comments
 
LVL 100

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 100

Expert Comment

by:mlmcc
ID: 39227255
Which parameter?

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

mlmcc
0
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 100

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now