Information générale
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Hi Sergey and Cathy,
I've got it working now. I see now that I had two choices: 1)Use a calculated field in the subtotal band, and use the format property or 2)or use a report variable - and then use transform.. one or the other but not both. The problem as you've pointed out was that I was trying to use transform on a calculated field. I've since found a KB article that explains that this behavior is by design. I see now that the mistake I made was that I was trying to apply a sum on a report variable that was already summed, I was mixing up my report variables and calculated fields.
I am using Accountmate software and trying to adhere to their standards. They use transform and report variables in the subtotal band.. so I will stick with that for consistencies sake. (although it does seem to be more work to use a report variable and transform than just using a calculated field and the format property)
Thanks for your help!
David Schlesinger
>Hi David,
>
>Why don't you set report field format to '9999999' instead of transform?
>It's not going to work the way you are trying to do because VFP applies SUM to the field expression. In your case transform() makes that expression a string. You have to create report variables to calculate SUMs and that us ethem in TRANSFORMs.
>
>>I am modifying a report that previously worked. In the detail band of the report there are objects which use the transform() function.
>>e.g. transform(nsubdamt,'99999') or using qtypict function. These objects don't have a problem.
>>
>>In the subtotal band there are also objects that use transform() . But in the subtotal band, all of the values show up as asterisks.
>>
>>No matter what I do I can't get them to go away. Steps I took to fix the asterisks:
>>1) Make the field on the report extremely wide (say 6 inches)
>>2) instead of using transform use: alltrim(str(ntsubdamt)
>>3) use transform with no parameters: transform(ntsubdamt) 4) transform(ntsubdamt,'9999999')
>>
>>The values stored in the detail band and subtotal band are small, i.e. - under 100 in every case.
>>
>>So I'm pretty sure that the usual reasons for getting asterisks in the report writer, such as the report field not being wide enough, or transform itself returning asterisks, should not be the case here.
>>
>>
>>I always get 4 asterisks in the subtotal band. There are only two ways that I can get the object to show without asterisks:
>>1) Show the native number, with decimals - without converting it to a string or using transform.
>>(when I do this I get the actual number - so I know the actual value in the report is really a small number).
>>
>>2) Use transform in the expression - but don't use the sum function.
>>
>>At one point I had this working, but then it broke again. At the point at which I had it working I had recreated the objects in the subtotal band from scratch, as opposed to copying and pasting from another object in the band. Then, it broke again after I changed the NAME of the data group by expression (from 'citemno' to 'xbreakon').
>>
>>
>>I'm inclined to think that my FRX is corrupt or something similar. Or.. more likely.. something really simple I am overlooking.
>>
>>Any ideas?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement