cancel
Showing results for 
Search instead for 
Did you mean: 

Formula as parameter field problem

Former Member
0 Kudos

Hi All

I am using crystal xi and have a main report with a subreport. Both reports have a 'datetime' field that I need to link on and create a parameter field.

For end user ease I have changed the 'datetime' fields to 'date' and linked the subreport using that formula, and all works well

I set up a parameter field for a Date Range and set the {@date} field from Select Expert = paramater field and now the information has changed.

I have manually checked the information returning and can't find any obvious problem.

Any theories??

Thanks very much in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

With the Parameter as Date Range, shouldn't it be using the IN instead of = (Equal sign)?

Eg :

Invoice Date in {?DateRangeParameter} instead of

Invoice Date = {?DateRangeParameter}

Answers (1)

Answers (1)

Former Member
0 Kudos

How has it changed?

Former Member
0 Kudos

Hi Debi

I am doing a productivity report which without the parameter field displays as follows;

Employee No. Name Producive hrs Non-productive hrs Total hrs %

10343 Joe Blogg 49.5 12 61.5 80.49

10346 Dave Smith 26.5 2 28.5 92.98

This information is correct. The non-productive hrs are from a subreport using shared variables.

With the parameter field displays as follows;

10343 Joe Blogg 49.5 1.75 51.25 96.59

10346 Dave Smith 26.5 0 26.5 100.00

As I said, I have run the subreport to check what is displaying with the parameter field but there isn't anything obvious.

Thanks

Edited by: duffey01 on Nov 11, 2010 11:54 AM

Edited by: duffey01 on Nov 11, 2010 11:54 AM

Former Member
0 Kudos

Sorry Debi, I didn't preview before posting my reply and now I can't find how to change it. The reply hasn't displayed very well. Let me know if you need me to change it.

Former Member
0 Kudos

When did you change the datetime field to a date field? This may be the source of the change.

Former Member
0 Kudos

If I changed the field from 'datetime' to date so my end users wouldn't have to enter a date time in the parameter prompt box.

Former Member
0 Kudos

I under stand why you changed it. I asked when you changed it.

Was it set to a date when you pulled the first set of data, or did you change it when you created the date parameter?

Former Member
0 Kudos

The 'todate' formula has been on the report since I started.

Former Member
0 Kudos

If you take the date parameter out of the selection does the result go back to what it was?

Former Member
0 Kudos

Yes, if I use Select Expert in both reports and set the 'todate' formula field to 'is between' it works fine.

Former Member
0 Kudos

Your date parameter is a range? Don't know this will help but try using start date and end date parameters-I find them more reliable

With

Date >= startdate and date < enddate+1

Hey, did you set the datetime fields to dates in both the container report and the subreport???

Is it possible the data changed in the database?

Edited by: DebiHerbert on Nov 11, 2010 8:18 PM

Former Member
0 Kudos

Hi Debi

I really don't want to sound so stupid, but what do you mean by 'try using start date and end date parameters'?

Date>=startdate and date < enddate+1

I set up a Start Date parameter and a End Date Parameter but I got stuck when setting the {@date} to the parameter field using Select Expert, I needed to set the {@date} to two parameters fields??

Yes, I set the datetime fields to date in both main and sub reports.

The data has not changed in the database.

I am really stuck on this and am very grateful for your help.