If you meant you're working inside Excel, just change the built-in constant to open the Print dialog, on which you must set the printing parameters.
Hope it helps
____________________________
Real Programmer can count up to 1024 on his fingers
08-03-2003 at 03:12 PM
|
Swing5 Level: Guest
Re: How to print a spreadsheet using VB
Thanks for the prompt reply. Here is the real situation. The default setting for the DataReport is portrait, I can't figure out how to set it to a landscape so I'm considering to use the spreadsheet to serve as my report printing tool since I can configure the spreadsheet the way I want, like putting colors and highligting text. I dont want to use Crystal report because it will add additional set up and cost. Hope I can extract additional help, thanks again.
08-03-2003 at 03:34 PM
|
yronium Level: Moderator Registered: 14-04-2002 Posts: 907
Re: How to print a spreadsheet using VB
Well in the Print dialog you can configure the portrait/landscape print, and other printing parameter, ...but maybe you want to do it automatically. In fact, I didn't understand yet if you're working inside Excel or not, but if you speak about Crystal Report I guess you're working in VB, isn't it? So this case is not VBA your solution. Tell me if I'm wrong.
A friend of mine told me about another report managing tool he used, but I don't remember the name (but I'll ask him when I have the chance). I'm not strong on report managing, but I'm sure that you can find some free tools on the web, other than CryRep.
I hope somebody else on this board can point you to one useful alternate tool.
So, sorry for not being helpful enough.
____________________________
Real Programmer can count up to 1024 on his fingers
08-03-2003 at 05:42 PM
|
Swing5 Level: Guest
Re: How to print a spreadsheet using VB
Thanks again,
I'm using VB, everything is almost done, the only problem now is how to print the data that I extracted from Oracle and Access. The first solution that came into my mind was to use the DataReport but I can't make it the page layout to be a landscape(default is portrait), second is I tried to use the Crystal...there's no problem witht the crystal but it requires additional set up and of course the software. We have Office 97 installed in every system so that is my last option to transfer the data from oracle/access into excel file which is pre configured the layout, the only problem of mine is how to directly print the excel file from VB. I tried to use the macro recorder but I failed, maybe I'm not courageous enough to solve those problems I encountered that is why I posted my problem here, thanks again to those who are willing to help
:OK:
09-03-2003 at 08:55 AM
|
yronium Level: Moderator Registered: 14-04-2002 Posts: 907
Re: How to print a spreadsheet using VB
I opened Access97, created a new report and checked, in VBA, many properties of the Me. object, searching with F1 on the unknown ones. I found the PrtDevMode property, and I think it'd be useful to you if you read the online help of this property. It allows also to specify the orientation of printing.
Maybe, you can set it and try to print the Access report from VB. It's all to try out. But have a look on it.
Hope it helps
____________________________
Real Programmer can count up to 1024 on his fingers
10-03-2003 at 03:00 PM
|
Swing5 Level: Guest
Re: How to print a spreadsheet using VB
Thanks for the reply again, I'll try this one and maybe it will work this time :OK: