Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula cannot be evaluated at the time specified?

Status
Not open for further replies.

xterra

Programmer
Apr 5, 2001
71
US
Hi,

I am trying to pass a shared variable to my Record Selection Formula in a Subreport. I set the shared variables in the Main report in the Page Header so the values should be set when the SubReport needs them. When I run the report I get the Error "Formula Cannot be evaluated at the time specified" and I don't get any records. I am using whileprintingrecords in my subreport so I don't think that is the problem. Anyone have any Ideas?

Thanks,

Adam
 
As far as I know you can't do evaluation time formula's for group selection. The best that you can do is create a group based on that formula in the record selection, suppress the details and put those details in that group footer.
 
Ok is there anyway that I can get the value from the Main Report to the subreport and use it in my record selection formula? That is all I really need for example:

In my Main Report I have a Parameter Field that is passed a date from VB. I want to only get records in my subreport that fall under that date given. Does this make any sense? If you think of something I would greatly appreciate it.

Thanks for your help,

Adam
 
Another way is to link that parameter from the main report to the sub-report. When you are creating the link you can have Crystal construct the selection formula in the sub-report for you.

DjangMan
 
Ok we are getting somewhere now, what you said makes sense and it almost works except for one thing. When I try to make the link, in the right dropdown box that has the fields to link the main report to in the subreport, there are not any fields shown. I tried accepting it anyways but it just acts like a cancel and won't do anything. But this should work if I could just figure out why it isn't showing any fields.

Thanks,

Adam
 
I know, there's a bug somewhere in that linking window. Does the data type of your parameter differ from the 'link to' field in your sub-report: date vs. date-time?

Try making a parameter in your sub-report and then linking to that parameter. Crystal starts to get really fun at this point but it's nothing we can't 'correct'.

DjangMan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top