Using output format in dictionary (ContextMenu Builder)
At 16 JUL 2012 04:25:58PM Jim Vaughan wrote:
We have some symbolic fields in the dictionary with output conversions specified (e.g. "MD20" for a numeric value). When used in the BRW these values always display as zero, even when non-zero. We also have output conversion for some date values (e.g. "D2-") and these conversions have no effect at all on the output. How are the dictionary output conversions supposed to affect the output in BRW?
Jim R Vaughan
At 16 JUL 2012 04:28PM Jim Vaughan wrote:
Sorry, this was supposed to be in the Banded Report Writer category.
Jim R Vaughan
At 16 JUL 2012 11:23PM bshumsky wrote:
We have some symbolic fields in the dictionary with output conversions specified (e.g. "MD20" for a numeric value). When used in the BRW these values always display as zero, even when non-zero. We also have output conversion for some date values (e.g. "D2-") and these conversions have no effect at all on the output. How are the dictionary output conversions supposed to affect the output in BRW?
Jim R Vaughan
Hi, Jim. The BRW actually tries to determine the base "data type" of the data, using the output conversion, and then allows you to format the data using the per-field formatting that's built in to the BRW designer. So, for example, with your date values, the BRW "knows" these are date fields and you can then use the "Format" property (found on the Properties tab for each field) to select "Date", "Short Date", "Long Date", etc. for the specific format you'd like to see displayed. I believe you can even use a custom format to get exactly the output you desire, if the built in formats aren't sufficient.
We treat the data as its "base type" because you can then apply type-specific operations to the data (for example, if we've determined that the data is numeric, you can then do addition, subtraction, etc. of the field).
The MD20 data _should_ show up as numeric, or perhaps currency; _is_ the data, itself, all-numeric (except for the decimal point)?
- Bryan Shumsky
At 17 JUL 2012 09:47AM Jim Vaughan wrote:
Thats good to know about the base "data type".
Yes, I'm sure it is numeric (e.g.13.50). I can see the same data in Rev Reporter or Report Builder and I have looked at the values that have been assigned to @ANS. In BRW they are always shown as zero.
Jim R Vaughan
At 17 JUL 2012 02:16PM bshumsky wrote:
Thats good to know about the base "data type".
Yes, I'm sure it is numeric (e.g.13.50). I can see the same data in Rev Reporter or Report Builder and I have looked at the values that have been assigned to @ANS. In BRW they are always shown as zero.
Jim R Vaughan
OK, I think I've found the issue. The logic that determines the data type from the conversion code is seeing the scale factor ("0") and incorrectly concluding that this is an integer value. After the conversion, though, we still have decimal fields returned, and thus the conversion of the data to the VB integer data type is failing. I'll fix this for the 9.3.2 release.
Thanks!
- Bryan Shumsky
At 17 JUL 2012 02:22PM Jim Vaughan wrote:
Great!
Jim R Vaughan