Selwyn,
Re: My question about Dynamic Group Breaks in Reports: I tried John Zaleski�s suggestion but the break expression in the report writer does not take calculated fields any more than it takes global variables.
I think you should seriously consider making the break expression in the report writer take global variables with field names as values such that having the variable in the break expression would cause the report to break on changes in the field�s value [maybe your left(eval(var->br),1) would work if the break expression would take the global variable].
Having this ability would allow us to build a kind of report generator for users, which is essentially what my client wanted me to build. The more complex story of what I was trying to do was as follows:
1. Build a common report detail section that gets used in any number of �different� reports (different mostly obviously in the group breaks but different in other ways too). In this case it was to print landscape on legal 14" paper, so it has a good number of fields, many of which are dates.
2. I put some fields and their labels in conditional objects so they would print or not depending on global variables set in a dialog form. One example for this client was a field that calculated (in a non-obvious way) a broker�s gross profit on a mortgage loan. The boss wants that field to print but for his staff he wants he wants a different field to print in that spot. He has not asked for this yet, but one might also set up the dialog so that users could click on a number of field combinations they might want or not want on the report. You could also have entire summary sections for a group show or not show on a conditional object. This is all do-able right now and what I have tried works very well. You might say, why not just build separate reports? But will be apparent below, we are talking about a large number of separate reports here.
2. My client wants the user to be able to pick from a list of 7 date fields to be the date used for the user specified date range for the report run. Again, nothing to it as you can use variables for the date field name and the dates. (Well, it is a little tricky to set it up, but as usual in Alpha Five it can be done.)
3. My client also wants to be able to specify the sort (including ascending/descending) for the detail records in the groups. Again, no problem.
4. Lastly, my client would like the user, sticking with just this one long and somewhat complex report layout of fields, to be able to select 1, 2 or 3 fields from a list of 10 fields to be used for up to 3 group breaks in the report. This too would all be easily do-able if the break expressions could take variables. But without this final piece to the puzzle I am faced with copying the first layout many times (I don�t even want to think about how many times!) and then modifying each to cover one the numerous possible break situations he wants covered. Not only is that a lot of work, I�ll inevitably have a lot more work to do when he wants even a simple modification to the basic layout. Whatever work it amounts to it could mostly be avoided if there were only the one layout to deal instead of God knows how many.
Now, independent of this client, I think this would be very flexible, powerful tool in the Alpha Five arsenal. Of course for a single table or set one could also build other report layouts that could be used with this report generator dialog (just add a drop down for �Which report layout do you want generated?�), making it an even more powerful tool.
Anyway, I think you should consider all this, especially if it is not a big task to make the break expression take global variables.
Raymond Lyons
Re: My question about Dynamic Group Breaks in Reports: I tried John Zaleski�s suggestion but the break expression in the report writer does not take calculated fields any more than it takes global variables.
I think you should seriously consider making the break expression in the report writer take global variables with field names as values such that having the variable in the break expression would cause the report to break on changes in the field�s value [maybe your left(eval(var->br),1) would work if the break expression would take the global variable].
Having this ability would allow us to build a kind of report generator for users, which is essentially what my client wanted me to build. The more complex story of what I was trying to do was as follows:
1. Build a common report detail section that gets used in any number of �different� reports (different mostly obviously in the group breaks but different in other ways too). In this case it was to print landscape on legal 14" paper, so it has a good number of fields, many of which are dates.
2. I put some fields and their labels in conditional objects so they would print or not depending on global variables set in a dialog form. One example for this client was a field that calculated (in a non-obvious way) a broker�s gross profit on a mortgage loan. The boss wants that field to print but for his staff he wants he wants a different field to print in that spot. He has not asked for this yet, but one might also set up the dialog so that users could click on a number of field combinations they might want or not want on the report. You could also have entire summary sections for a group show or not show on a conditional object. This is all do-able right now and what I have tried works very well. You might say, why not just build separate reports? But will be apparent below, we are talking about a large number of separate reports here.
2. My client wants the user to be able to pick from a list of 7 date fields to be the date used for the user specified date range for the report run. Again, nothing to it as you can use variables for the date field name and the dates. (Well, it is a little tricky to set it up, but as usual in Alpha Five it can be done.)
3. My client also wants to be able to specify the sort (including ascending/descending) for the detail records in the groups. Again, no problem.
4. Lastly, my client would like the user, sticking with just this one long and somewhat complex report layout of fields, to be able to select 1, 2 or 3 fields from a list of 10 fields to be used for up to 3 group breaks in the report. This too would all be easily do-able if the break expressions could take variables. But without this final piece to the puzzle I am faced with copying the first layout many times (I don�t even want to think about how many times!) and then modifying each to cover one the numerous possible break situations he wants covered. Not only is that a lot of work, I�ll inevitably have a lot more work to do when he wants even a simple modification to the basic layout. Whatever work it amounts to it could mostly be avoided if there were only the one layout to deal instead of God knows how many.
Now, independent of this client, I think this would be very flexible, powerful tool in the Alpha Five arsenal. Of course for a single table or set one could also build other report layouts that could be used with this report generator dialog (just add a drop down for �Which report layout do you want generated?�), making it an even more powerful tool.
Anyway, I think you should consider all this, especially if it is not a big task to make the break expression take global variables.
Raymond Lyons
Comment