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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GroupOptions.ConditionField

Status
Not open for further replies.

sultan123

Technical User
Nov 11, 2003
28
GB
Thank you in advance..

I am using CPEAUT32

Done followings:

Dim app1 As CRPEAuto.Application
Dim rpt1 As CRPEAuto.Report

Dim strapppath As String
strapppath = App.Path

Set app1 = CreateObject("crystal.CRPE.Application")
Set rpt1 = app1.OpenReport(strapppath & "\Last Year's Sales.rpt")

So far it works fine ie
if i do
rpt1.preview
then it would open the above report as requested.


However I want to change the Group
from existing 'by Region' TO 'by Country'. So I do the follwoings:

rpt1.Areas("Group #1 Name").GroupOptions.ConditionField = _
rpt1.Database.Tables("Customer").Fields("Country")

It doesn't work and I get the following error:

Error No 20538:
Last Year's Sales.rpt: parameter has invalid structure size


Any help ?

Also
I am trying to pring to printer where i want the user to choose the printer,
I have
rpt1.printOut which goes straight to the default printer..
rpt1.SelectPrinter "", "", "rpt1"
rpt1.PrintOut
this also sends it to default printer.

Is it possible to let the end user choose the printer at run time ,if so how?

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top