` Crystal report dates from Clarion dates (James Harper ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Crystal report dates from Clarion dates
2001-08-14 -- James Harper
 
if you're talking about passing parameters via the crystal api then the magic number you want is 2378857 the code I use to pass parameters adds this number to the long value of the clarion date to put in the crystal date field like so: CASE PEParameterFieldInfo.ValueType OF PE_PF_NUMBER PEParameterFieldInfo.CurrentValue_NUMBER = pValue PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_CURRENCY PEParameterFieldInfo.CurrentValue_CURRENCY = pValue PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_BOOLEAN PEParameterFieldInfo.CurrentValue_BOOLEAN = pValue PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_DATE PEParameterFieldInfo.CurrentValue_DATE = pValue + 2378857 PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_STRING PEParameterFieldInfo.CurrentValue_STRING = pValue PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_DATETIME DateTime = pValue PEParameterFieldInfo.CurrentValue_DATETIME.CurrentValue_DT_DATE = DateTime.DT_Date + 2378857 PEParameterFieldInfo.CurrentValue_DATETIME.CurrentValue_DT_TIME = DateTime.DT_Time/100 PEParameterFieldInfo.CurrentValueSet = TRUE OF PE_PF_TIME PEParameterFieldInfo.CurrentValue_TIME = pValue/100 PEParameterFieldInfo.CurrentValueSet = TRUE END in this case pValue is an 'any' type parameter value passed to the above code


Today is April 26, 2024, 11:29 am
This article has been viewed 35114 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: