Thanks for sending me the sample report from the newsletter, however it wasn’t quite the solution I was seeking.
The report talks through a user on how to automatically resize cells in a report. However I want to do this in code. Having generated a report programmatically, I need to make sure its legible. There seems to be no obvious way to do this. If you have some additional tips then I’d appreciate them.
Just to clarify, I’m using Business Objects 4.1.1, and I’m driving it using OLE from a VBA application.
Leigh,
You say you are driving BO using OLE from a VBA application. Could you share some details (framework) of how you are doing this. Until now we are using Crystal Reports to do printing from a VB application. I was looking a few months ago, if it was possible to replace it by BO but I gave up after a while. The main problem (amongst other minor ones) I had was that I did not find a acceptible way to let the user preview his report before he/she would send it to the printer. In your application, can a user preview a report (in BO) before printing? I have been asking this question before on this list but never recieved an answer, so I suppose it is not possible. I’m really wondering if there is someone making VB (or other) applications with BO reports that are distributed with success to happy end-users. If so, please let me know I you achieved this.
Its quite a simple application, the VBA application is used to specify some data, and variables which is then manufactured as a report in Business Objects. Our intention is not to use BO just as a reporting module, but to simplify the initial determination of the type and context of a report. We have found that an additional interface to Bus. Obj removes the need for the user to know anything about the database, just what they want to see on a report.
All further activities such as drill-down etc are done from within Bus. Obj. itself. As you can imagine though, theres a fair amount of work required to manufacture the initial report.
Unfortunately there seems to be no OLE access to a lot of functionality (such as setting scope of analysis, etc.) which means that a ‘default’ report has to be created by hand by a developer - it is this report which is customised by the user to their own needs (driven by VBA & OLE). The layout cannot be altered by OLE so templates are required. An additional problem is trying to resize the cells on the report.
In answer to your question, it seems to me that previewing a print job is fairly simple. There are two methods, depending on whether Bus. Obj. is ‘visible’ to the user.
Bus. Obj. visible - simply call the print preview command and switch to Bus. Obj. the preview window is displayed. However this isn’t ideal
Bus. Obj. ‘invisible’. You could try showing the report in an OLE container in your VB application. I guess essentially you’d have to produce your own ‘Print Preview’ window which was a Form, with several command buttons and an OLE container which is used to ‘view’ Bus. Obj. This would neatly simulate the Print Preview option you require, as long as you set default zooming, etc.
Take a look at the EIS example app, that uses a OLE container and accesses Bus. Obj commands from VB5.
Hope this helps.
L.
p.s. still looking for help on resizing cells in code!
______________________________ Reply Separator _________________________________
Author: Peter Notenbaert peter.notenbaert@AQUAFIN.BE at DTCG.UK.INTERNET
Date: 28/07/98 11:41
Leigh,
You say you are driving BO using OLE from a VBA application. Could you share some details (framework) of how you are doing this. Until now we are using Crystal Reports to do printing from a VB application. I was looking a few months ago, if it was possible to replace it by BO but I gave up after a while. The main problem (amongst other minor ones) I had was that I did not find a acceptible way to let the user preview his report before he/she would send it to the printer.
In your application, can a user preview a report (in BO) before printing? I have been asking this question before on this list but never recieved an answer, so I suppose it is not possible. I’m really wondering if there is someone making VB (or other) applications with BO reports that are distributed with success to happy end-users. If so, please let me know I you achieved this.
I have tried both options and found both not ideal. The problem with the second was in scrolling in an OLE container, I didn’t find a way to determin how long a report is, I did some experiments with the sizemode property, but with no succes. In the EIS example the height and width of the OLE container are hard coded, not very usefull for simulating a print preview.
Bus. Obj. visible - simply call the print preview command and switch to Bus. Obj. the preview window is displayed. However this isn’t ideal
Bus. Obj. ‘invisible’. You could try showing the report in an OLE container in your VB application. I guess essentially you’d have to produce your own ‘Print Preview’ window which was a Form, with several command buttons and an OLE container which is used to ‘view’ Bus. Obj. This would neatly simulate the Print Preview option you require, as long as you set default zooming, etc.
Take a look at the EIS example app, that uses a OLE container and accesses Bus. Obj commands from VB5.