I have a few reports that has been left alone for quite some time. With a new report I created for our application, I can't have it ignored. So this report and the others need to be fixed.
I spent some time on it and I have no idea how. I did learn a few things while I was playing around. You can only group with a string value. You can sort with whatever data type. So that is the problem here. I am using CR10 with VB6. VB passed a lot of parameters to CR so the report shapes to clients expectations.
One of the parameters is a GroupBy parameter as well as a SortBy parameter. Client can group by Store Number. The data type for Store Number is Number, not a String. I used the TOTEXT to make the grouping work. It is fine for the first 9 stores. The tenth and so on store is not correct.
I use a formula to handle GroupBy and SortBy to have it the report display what the client selected.
I tried to use TONUMBER and there is an error as you can only group by string. I tried to use TOTEXT() to fill with "0000", it works but we can't have padded zeros. The store number can be up to 4 digits long and it is not necessary padded.
So instead of grouping by store number to have it like this.
1
2
3
11
22
33
It is grouping like this.
1
11
2
22
3
33
This works
0001
0002
0003
0011
0022
0033
But no padding is allowed. So I am back to square one.
Is there a trick to solve this?
I spent some time on it and I have no idea how. I did learn a few things while I was playing around. You can only group with a string value. You can sort with whatever data type. So that is the problem here. I am using CR10 with VB6. VB passed a lot of parameters to CR so the report shapes to clients expectations.
One of the parameters is a GroupBy parameter as well as a SortBy parameter. Client can group by Store Number. The data type for Store Number is Number, not a String. I used the TOTEXT to make the grouping work. It is fine for the first 9 stores. The tenth and so on store is not correct.
I use a formula to handle GroupBy and SortBy to have it the report display what the client selected.
I tried to use TONUMBER and there is an error as you can only group by string. I tried to use TOTEXT() to fill with "0000", it works but we can't have padded zeros. The store number can be up to 4 digits long and it is not necessary padded.
So instead of grouping by store number to have it like this.
1
2
3
11
22
33
It is grouping like this.
1
11
2
22
3
33
This works
0001
0002
0003
0011
0022
0033
But no padding is allowed. So I am back to square one.
Is there a trick to solve this?