|
-
Jan 19th, 2007, 02:54 PM
#1
Thread Starter
New Member
Crystal Report XI parameters and VB application
I am creating a report where the user can fill in the start and end date for 4 columns, and also a T/F for each of the columns visibility.
So that alone creates 12 parameters, not including the other junk I need.
It looks rediculous and long since everything is streamed downwards.
My boss would like me to instead build a small VB application that asks for all the parameter, where the UI would look and work much more efficiently for the user.
All the information i have came across so far is how to open a crystal report from a vb app, but not quite with the interaction Is there anyway to link a VB application so that it can pass the information into a Crystal report?
-
Jan 19th, 2007, 03:48 PM
#2
Frenzied Member
Re: Crystal Report XI parameters and VB application
This following is a sub that use on one of my apps that passes a variable to a parameter in CR XI.
VB Code:
Private Sub RunReport()
Dim crxApp As New CRAXDDRT.Application
Dim crxReport As CRAXDDRT.Report
Dim crxDatabaseTables As CRAXDDRT.DatabaseTables
Dim crxDatabaseTable As CRAXDDRT.DatabaseTable
Dim crxDatabase As CRAXDDRT.Database
Dim crxParm As CRAXDDRT.ParameterValues
Dim crxSubReport As CRAXDDRT.Report
Dim ReportName As String
ReportName = "\\SERVER\Other\Reports\PL.rpt"
Set crxReport = crxApp.OpenReport(ReportName)
crxReport.ParameterFields.GetItemByName("Invoice").AddCurrentValue lInvoiceNo '<-- Variable
crxReport.ParameterFields.GetItemByName("BO").AddCurrentValue iBO '<-- another variable
crxReport.PrintOut False, 1
With crView
.ReportSource = crxReport
.ViewReport
While .IsBusy
DoEvents
Wend
.Zoom "75"
.Visible = False
End With
End Sub
-
Jan 31st, 2007, 04:45 AM
#3
Junior Member
Re: Crystal Report XI parameters and VB application
-
Feb 4th, 2007, 08:15 AM
#4
New Member
Re: Crystal Report XI parameters and VB application
 Originally Posted by Besoup
crxReport.ParameterFields.GetItemByName("Invoice").AddCurrentValue lInvoiceNo '<-- Variable
crxReport.ParameterFields.GetItemByName("BO").AddCurrentValue iBO '<-- another variable
[/Highlight]
sir, may i know "invoice" and "BO" is from Crystal reports or from VB?
-
Feb 4th, 2007, 11:31 AM
#5
Frenzied Member
Re: Crystal Report XI parameters and VB application
 Originally Posted by eureka8888
sir, may i know "invoice" and "BO" is from Crystal reports or from VB?
Yes that is the name of the parameter fields inside my report.
-
Feb 4th, 2007, 09:12 PM
#6
New Member
Re: Crystal Report XI parameters and VB application
and sir lInvoiceNo and iBO are variables from VB where CR will gt the values?
-
Feb 5th, 2007, 06:30 AM
#7
Frenzied Member
Re: Crystal Report XI parameters and VB application
 Originally Posted by eureka8888
and sir lInvoiceNo and iBO are variables from VB where CR will gt the values?
exactly.
-
Feb 6th, 2007, 07:24 PM
#8
Thread Starter
New Member
Re: Crystal Report XI parameters and VB application
thank you all for so much help
unfortunatly i am still quite confused
I am working in visual studio 2005
and even when i type in
Dim crxApp As New CRAXDDRT.Application
i keep getting underlines under crxApp and CRAXDDRT.Application
is there a library I am suppose to include?
-
Feb 7th, 2007, 03:49 AM
#9
New Member
Re: Crystal Report XI parameters and VB application
i thonk you need crystal reports developers edition.
-
Feb 7th, 2007, 06:45 AM
#10
Frenzied Member
Re: Crystal Report XI parameters and VB application
Yes make sure you reference Crystal ActiveX Report Veiwer Library 11.0
-
Mar 6th, 2007, 09:49 AM
#11
Addicted Member
Re: Crystal Report XI parameters and VB application
I have a question on the example given above. The "CRAXDDRT" ? Where does that come from. I have added the refernce given but do not have that as an option when creating the Dim statement.
Thanks,
Russ
-
Mar 6th, 2007, 10:19 AM
#12
Addicted Member
Re: Crystal Report XI parameters and VB application
OK, I think I've found it. I needed a reference to another library. Also it's CRAXDRT and not CRAXDDRT.
Thanks,
Russ
-
Sep 22nd, 2007, 04:40 AM
#13
-
Sep 24th, 2007, 01:43 AM
#14
Addicted Member
Re: Crystal Report XI parameters and VB application
 Originally Posted by waelr
Please i would like to know if we can by code select some of the default values from the left to the right side.
Please it's Ergent
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|