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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared Date variable not working

Status
Not open for further replies.

Fermo Zolli

Technical User
Aug 20, 2019
10
IT
Hello, everybody,

New in this Forum,

With CR 2008 Version 12.3.0.601 I have created a subreport and edited a formula as follows:

//@SubFormula
//Returns the value that was stored
whileprintingrecords;
Shared DateVar DataCompletamento;{FOLLOWUP_STEP.WFFS_COMPLETION_DATE}

(note: if I try to write
Shared DateVar DataCompletamento:={FOLLOWUP_STEP.WFFS_COMPLETION_DATE};
It gives error)

COMPLETION_DATE is a Date and Time field. It is working correctly as I can ready its value in detail_a

Main report, I created another formula with same name (DataCompletamento) as the one in subreport, as follows:

//@MainFormula
//Returns the value that was stored
whileprintingrecords;
Shared datevar DataCompletamento;

I put this formula in detail_b area and I do not get any result: Why is it not working?
The 2 reports are linked and it is working correctly. I did so many trials but without any success.

Mi final goal is to get a difference in days between this date and another date in masni report.

Any help would be more than welcome.

 
Change the formula in the subreport to:

shared datevar Datacompletamento := date(FOLLOWUP_STEP.WFFS_COMPLETION_DATE});

-LB
 
 Fo
Thank you very much, it works perfectly!
I am so happy to finally discover to not be alone (with sometimes real headache)! why didn't I do that before!

Another question: is thsat a way to bring the result at the same level of the main report in detail_a?

One more time thank you very much.

FZ
 
I don’t have enough info here. Where is the subreport located?

If the only value in detail_b is the shared variable, and you want it to appear in the same row as detail_a, you can just format detail_a to “underlay following sections”.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top