Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No .PaperOrientation field! 1

Status
Not open for further replies.

KPharm

Programmer
Feb 1, 2001
38
US
I'm using CR7 with VB6 and everyone's answer to programically setting the orientation says to set the .paperorientation property after setting the printer name/driver/port.

The problem is, my CrystalReport1 component on my form does not have this property. Therefore, when I send the report directly to the printer (no preview) the result is Portrait. PS. I did set it to landscape in the report at design time.

Any thoughts?
Thanks
 
Back to the top - really need an answer if anyone can help!

Thanks
 
Hi,
When I first had this problem I had v6.0 I looked it up all over the place on the 'net. The only answer I could find is that they did not implement printer property APIs in CR until version 8. So, I had the company I work for buy version 8. I know this is not what you want to hear, but you may be forced to buy version 8 for this functionality. You may want to do a search on it on the CR knowledgebase. The only other possibility is to go through the Windows API, but that will be tough to incorporate.
Brett Please visit my websites!
 
Thanks for the good info but that's horrible news since everything takes about a year to get moving here.

I started this new method using the SCR Automation Server in hopes of more flexibility but I get the following error on the LogOnServer line: "20599: Cannot open SQL server."

Dim crystalApplication As CRPEAuto.Application
Dim crystalReport As CRPEAuto.Report

Set crystalApplication = CreateObject("Crystal.CRPE.Application")

Call crystalApplication.LogOnServer("P2SODBC.DLL", m_sServer, , m_sUsername, m_sPassword)

Set crystalReport = crystalApplication.OpenReport(m_sReportName)

m_sServer is the ODBC name (which works) and the username and password is correct.

Anyway, if you've ever used this method then maybe you can see my mistake.

Thanks again.
 
Crystal Decisions knowledgabase article #c2004178 gives some solutions. It looks like you are not passing it all the parameters to log into the server...

I was wrong about the paperorientation thing. It is "supported" in v6 and v7 but is buggy. Here is an excerpt:

"The Automation Server (CPEAUT32) that shipped with the first release of Seagate Crystal Reports (SCR), version 6.0.x.135, has an issue with setting the printer driver with the .SelectPrinter method, then setting the report's paper orientation with the .PaperOrientation property."

You may want to look into this. I found this information by doing a search in the knowledgaebase on "paperorientation"

I am by no means an "expert," but I think these will help!
Brett
Please visit my websites!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top