Sometimes you may use an extra field in the SAMS database for information
that does not fit in one of our standard fields. If
the data entered does not match the type of intended for that field (String,
Date, Currency, etc.), it may become necessary to change the field type
in the SAMS Report Writer for proper display or sorting.
To convert the field type in a report listing only, follow these simple
example changes an Account Number field in the Membership Table to a Date
field for sorting:
In your report, click on the CALC tab (not the DATA tab calculation
-Click on the DBText field under Details in the Report Objects section
- you will need to count across your fields in the Detail band to determine
which one to change -
No is the third field from the left so it is labeled as DBText3. (See
screen shot below)
-At the very bottom right of the screen, click on the Language tab.
Code Toolbox to the right, click on Conversion.
-In the box below, click on StrToDate and drag it to the left into the
-Go back to the very bottom right of the screen and click on the Data
tab to show your fields again.
-In the formula that was entered, we need to add the Account Number
do this, highlight the "S" (do NOT include the parenthesis around
on the Account No field from the selection to the right and drag it to
replace the S you highlighted.
-Compile by Right clicking in the Code Editor box to make sure there
are no errors.
Now you can go back to your report and with Account number set in your
sort, it should work properly for your needs.