 |
boit Level: Scholar
 Registered: 28-04-2005 Posts: 42
|
component or reference
to anyone,
what reference or component item should i include in my vb program to get an object that i can use for driving a crystal report using CR version 10?
another question please
i used formerly CR v6 to created various reports. Now I am utilizing v10. Can I retain this reports created in v6 and maintain reports created in v10 using both in VB6 at the same time?
|
|
09-06-2005 at 10:55 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: component or reference
I am using CR 9.2, but I think it should be similar. You should add through Components (CTRL+T) Crystal Report Viewer 10 control. This should also add reference to Crystal report runtime library automatically. There is a tutorial in this section about how to use Crystal report (this post is marked as sticky). If this example cant be used with CR 10, then you should search on net for some simple tutorial, to start with.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
09-06-2005 at 05:21 PM |
|
|
boit Level: Scholar
 Registered: 28-04-2005 Posts: 42
|
Re: component or reference
Thanks, I will experiment on this.
|
|
09-06-2005 at 09:57 PM |
|
|
boit Level: Scholar
 Registered: 28-04-2005 Posts: 42
|
Re: component or reference
With crep
.Connect = RPTconstr
.SQLQuery = sqlstr & _
"From vpcon.dbo.mstrfle mstrfle where transdate = '" & pCurrDate & "' Order By mstrfle.transtype Asc"
.ReportFileName = prepFLDR & "todays.rpt"
.ReportTitle = "Transaction Date : " & pCurrDate
.Action = 1
End With
I am still having problems with CR v10. Can I also do the above statements with CR v10. The statements above is applied using CR v7. The parameters like RPTconstr, sqlstr, pCurrDate and prepFLDR are variables defined in VB6, and the dot commands are already available. Can I do the same with CR v10? Can you help with me with some sites you know? Thanks very much
|
|
11-06-2005 at 01:00 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: component or reference
Have you looked at the sticku topic in this section? Here you have an example-small tutorial on how to display basic report in VB.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
11-06-2005 at 03:58 PM |
|
|
boit Level: Scholar
 Registered: 28-04-2005 Posts: 42
|
Re: component or reference
goran,
i was able to display the report. thanks. now, am stuck with passing a discrete value to a parameter defined in CR V10.
reportName.parameterfields(1).value = variableInVB6
prompts an error "OBJECT DOES NOT SUPPORT THIS PROPERTY OR METHOD"
before in lower version of CR i just issue this statement, and it works
.ParameterFields(0) = "mctrlno;" & variableInVB6 & "; true"
where in mctrlno is the parameter in CR
thanks again.
|
|
12-06-2005 at 12:18 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: component or reference
reportName.ParameterFields(1).ClearCurrentValueAndRange
reportName.ParameterFields(1).AddCurrentValue (variableinvb6) |
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
12-06-2005 at 10:24 AM |
|
|
boit Level: Scholar
 Registered: 28-04-2005 Posts: 42
|
Re: component or reference
thanks again Goran!
Because of your great advices, I have a future! One more question if you may,
In the view report state of cry, how can I make user choose from a variety of printers either installed locally or through a network.
Only the print icon is displayed, and in the display I can only collate and choose which page(s) to be printed. No printer choices are available
Thanks a million! I pray that you be rewarded for your generosity.
|
|
13-06-2005 at 06:51 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: component or reference
You can loop through printers collection and add prinetr to combobox that you can put on CR toolbar, whcih will allow user to change printer before printing. This change is made through SelectPrinter method
Or, you can call PrinterSetup method which will open PrintSeup dialog.
Note: both methods are of CRAXDRT.Report object.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
13-06-2005 at 09:29 PM |
|
|
|
|
 |
 |