Thank you in advance..
I am using CRPEAut32 .dll Crystal Automation Server.. cr engine 6 object library...
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
========I have also tried This ==
Dim app1 As CRPEAuto.Application
Dim rpt1 As CRPEAuto.Report
Dim c_Country As String
Dim c_Region As String
Dim rpt1AreA As CRPEAuto.Area
Dim rpt1GrouP As CRPEAuto.GroupAreaOptions
Dim rpt1DatabasE As CRPEAuto.Database
Dim rpt1TableS As CRPEAuto.DatabaseTables
Dim rpt1TablE As CRPEAuto.DatabaseTable
Dim rpt1FieldS As CRPEAuto.DatabaseFieldDefinitions
Dim rpt1FielD As CRPEAuto.DatabaseFieldDefinition
Set rpt1DatabasE = rpt1.Database
Dim strapppath As String
strapppath = App.Path
Set app1 = CreateObject("crystal.CRPE.Application"
Set rpt1 = app1.OpenReport(strapppath & "\Last Year's Sales.rpt"
Set rpt1TableS = rpt1DatabasE.Tables
Set rpt1TablE = rpt1TableS("Customer"
Set rpt1FieldS = rpt1TablE.Fields
'Set rpt1FielD = rpt1FieldS("Country"
'Set rpt1FielD = rpt1FieldS("Region"
Set rpt1AreA = rpt1.Areas(3)
Set rpt1GrouP = rpt1AreA.GroupOptions
Set rpt1FielD = rpt1FieldS("Country"
Same error message .. at this --> Set rpt1FielD = rpt1FieldS("Country"
<---- point
Can you please HELP?
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 CRPEAut32 .dll Crystal Automation Server.. cr engine 6 object library...
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
========I have also tried This ==
Dim app1 As CRPEAuto.Application
Dim rpt1 As CRPEAuto.Report
Dim c_Country As String
Dim c_Region As String
Dim rpt1AreA As CRPEAuto.Area
Dim rpt1GrouP As CRPEAuto.GroupAreaOptions
Dim rpt1DatabasE As CRPEAuto.Database
Dim rpt1TableS As CRPEAuto.DatabaseTables
Dim rpt1TablE As CRPEAuto.DatabaseTable
Dim rpt1FieldS As CRPEAuto.DatabaseFieldDefinitions
Dim rpt1FielD As CRPEAuto.DatabaseFieldDefinition
Set rpt1DatabasE = rpt1.Database
Dim strapppath As String
strapppath = App.Path
Set app1 = CreateObject("crystal.CRPE.Application"
Set rpt1 = app1.OpenReport(strapppath & "\Last Year's Sales.rpt"
Set rpt1TableS = rpt1DatabasE.Tables
Set rpt1TablE = rpt1TableS("Customer"
Set rpt1FieldS = rpt1TablE.Fields
'Set rpt1FielD = rpt1FieldS("Country"
'Set rpt1FielD = rpt1FieldS("Region"
Set rpt1AreA = rpt1.Areas(3)
Set rpt1GrouP = rpt1AreA.GroupOptions
Set rpt1FielD = rpt1FieldS("Country"
Same error message .. at this --> Set rpt1FielD = rpt1FieldS("Country"
<---- point
Can you please HELP?
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