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
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