Passing Parameters To A Report Via CRViewer /Crystal Report 7
hi out there,I've got following problem: I'm working with a CRViewer to display Reports in my Progam. These Reports have Parameterfields. Normally the CRViewer displayes its own Dialog to input the Parameters. But I have to show my own Dialog in which I group parameters in a logical way. So far, so fine. This works perfect. But now I have to pass the parameters being inputed into my Dialog to the Report via CRAXDRT.Report when the OK-Button is pressed. I don't found a SetCurrentValue-Method like in CRPEAuto.Report. In the other way, if I use the method CRAXDRT.Report.ParameterFieldDefinitions.Item(index).AddCurrentValue nothing happend. Does anyone have a hint or idea how I can write my parameters into my reports via CRAXDRT.Report.ParameterFieldDefinitions ?Thanks in advanceAkademos
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Passing Parameters To Crystal Report From VB6
I'm trying to run a crystal report and generate a .csv file from VB6. I'm passing parameters to crystal report but it prompts me to type in the parameters. I don't want the users to type it in but rather pass it thru a variable. Here is a piece of my code:
eomCurrentStart = Year(Date) & "/09/01"
eomCurrentEnd = Year(Date) & "/09/01"
With CrystalReport1
.Connect = strconnLive
.ReportFileName = "M:ReportsEOMRenewals.rpt"
.Destination = crptToFile
.PrintFileType = crptCSV
.ParameterFields(0) = "@BeginDate;" & eomCurrentStart & ";True"
.ParameterFields(1) = "@EndDate;" & eomCurrentEnd & ";True"
.PrintFileName = strFilePath & "Test.csv"
.DiscardSavedData = 1
.Action = 1
End With
Any help would be appreciated.
Passing Parameters From VB To Crystal Report
Hello, Im new to Crystal Report and VB and i have some questions regarding CR.
Just as bshaen noted earlier, we need to go through all the process in connecting the database once we open CR. Does it mean that we left CR as a blank report? I need to do a report where i have to pass all the user input from VB to crystal report viewer. How can i make sure that all the parameters that i passed is in the correct position?One more question : is there any other method besides dataset?
Any help is very much appreciated
Thanx in advance =)
Passing Parameters To Crystal Report (RDC)
I am new to Crystal Reports. I earlier used Microsoft Data Report but it didnot have the 'Record Number' feature , so I have to re create my reports in Crystal Reports.I am using crystal report 8 designer control ( RDC) for my project on Payroll . I want to create a report which will generate the report based on the month & year.
I have a form containg two combo boxes from where the user will select the month & the year.
I want to pass this to Crystal Report Designer as a parameter.
I used the following query in data report.
select p.empno,e.fname, p.bsal,p.itax,p.netsal,p.mnth,p.yr from emp e, payroll p where e.empno=p.empno and p.mnth= ? and p.yr= ?
order by p.bsal
I used to pass the value for p.mnth & p.yr using the following code in a form which contained the text boxes.
[highlight=VB]
option Explicit
Private Sub Command1_Click()
deConsolidated.Command1 cmbMonth.Text, cmbYear.Text
drConsolidated.Show
End Sub
[vbcode]
Pls guide me how to pass the parameters from the above combo box to crystal report designer ( RDC)
Thanking you,
Rgds,
Dennis.
Passing Parameters To A Crystal Report
When using the RecordSlectionFormula
Code:
CReport.RecordSelectionFormula = "{Table1.Date} >= #" & DateFrom & "# And {Table1.Date} <= #" & DateTo & "#"
I want the DateFrom and the DateTo, that the user specified, to appear on the top of my Report. Does anyone know how to do this.
Using: CR Professional v8.5; MS Access 2000; VB 6.0
Passing Parameters To Crystal Report From Vb6
I'm trying to run a crystal report and generate a .csv file from VB6. I'm passing parameters to crystal report but it prompts me to type in the parameters. I don't want the users to type it in but rather pass it thru variables. Here is a piece of my code:
eomCurrentStart = Year(Date) & "/09/01"
eomCurrentEnd = Year(Date) & "/09/01"
With CrystalReport1
.Connect = strconnLive
.ReportFileName = "M:ReportsEOMRenewals.rpt"
.Destination = crptToFile
.PrintFileType = crptCSV
.ParameterFields(0) = "@BeginDate;" & eomCurrentStart & ";True"
.ParameterFields(1) = "@EndDate;" & eomCurrentEnd & ";True"
.PrintFileName = strFilePath & "Test.csv"
.DiscardSavedData = 1
.Action = 1
End With
Any help would be appreciated.
RE: Passing Parameters To Crystal Report From VB6
Hi
I would apprechiate some help with this one.
created my report with CR10, fine....
but, how do i send parameters to it from my vb application?
any pointers would be great!
thanks
Edited by - Afy on 1/29/2005 1:29:03 PM
Passing Parameters From Vb .net To Crystal Report
I can't get out of this problem... I have seen all recent posts on this topic but it seems there is no way...
I built a report who show me some data i needs... I also created a textbox who allows me to search for some records in the reports...
After the search is completed, I'd like to view the parameter inserted in the textbox on the report but i still can't do that...
So, i tried to create a simple passing parameter code in the vb form but it seems that it's ignored by the program because when i open the report it shows me a windows which asks me for the value of parameter...
Here is the code:
Dim crParameterFieldDefinitions As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions
Dim crParameterFieldDefinition As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
Dim crParameterValues As New CrystalDecisions.Shared.ParameterValues()
Dim crParameterDiscreteValue As New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim crReport As New CrystalReport1()
'Set Number Parameter
'Set the discrete value
crParameterDiscreteValue.Value = CInt(5)
' Access the first parameter field definition
crParameterFieldDefinitions = crReport.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions.Item("param")
' Add parameter value
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterValues.Add(crParameterDiscreteValue)
' Apply the current value to the parameter definition
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
It's obvious that i have also created a numeric parameter field in crystal report whose name is "param"...
PLEASE HELP ME!!!!
THANKS!!!!!!!!!!!
Passing Parameters To Crystal Report 9
Hi!
This will be quick...i tried using both functions to pass parameters to my reports.
varCR = PESetNthParameterField(intJobHandle, i, TCrystalParam)
or
varCR = crPESetNthParameterField(intJobHandle, i, .ValueType, .DefaultValueSet, .CurrentValueSet, .Name, .Prompt, .DefaultValue, .CurrentValue)
They worked fine. But all of a sudden, the parameters aren't passed anymore therefore prompting me for the values of the parameters, which shouldn't happen. What's happening here??
I confirmed that it wasn't passed to the report by using 'PEGetNthParameterField'.
This is urgent guys so any kind of help is a big one. thanks!
Passing Parameters To An Executable Crystal Report
I have a Crystal Report that is a stand-alone executable. The Report needs parameters passed to it, but I'm not sure how to do that when the report is an executable. I call the report through Shell, so can I pass the parameters on the command line?
Code:
'Like This?:
Shell App.Path & "MyReport.exe param1, param2", vbNormalFocus
Anyone have any ideas?
Problems Passing Parameters To Crystal Report
I have visual basic 6.0 and I need an example how pass a parameter to crystal report. I need to know what I need colocate in visual basic and what I need to colocate in crystal report. I suppose that the important is that crystal doesn't ask the parameter because it will recieve the information of the visual basic.
Passing Crystal Report Parameters Using Visual Basic
Hi There,
I am developing a small module for displaying the Price Catalog based on the Inventory Category.
The Crystal Report I have developed is in 8.5 and now am trying to call the same from Visual Basic.
I have created two Parameter fields in Crystal Report (StartCategory and EndCategory).
When I Preview Crystal Report, it prompts me for the Value of the Parameter field and display the
Report as per the selected Citeria, but when the same does not work for Visual Basic.
In Visual Basic, I have created two combo box, where in the User will specify the Start Category and End Category.
When i click on display button, the report is displyaed on the screen but with no data???
Could you please guide me as to how can i comeplete this small module?
Bst Rgds
Passing Parameters To Stored Procedure To Crystal Report RPT At Runtime
Hi all,
Can any tell me how to pass parameters to a stored procedure to RPT atruntime in VB? I am using Crystal Reports 8.5 and VB6
I have the following code, the stored procedure "spGetApptLoadingDaily"has one parameter, it keep asking me to select a recordset everytime Irun it (prompt me for a table name / sql). How can I get rid of thedialog box ?
adocomm.CommandText = "[spGetApptLoadingDaily]"
adocomm.CommandType = adCmdStoredProc
adocomm.Execute , 100
Report.Database.AddADOCommand Conn, adocomm
Report.Sections("D").AddFieldObject "{ado.FullName}", 750, 5
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Thanks and Regards,
KUEK Joe Sern
Crystal Report 8, CrViewer
Can anybody share me the code how to use crViewer? I'm currently need to use crystal report 8. I know the way to do it in crystal report 6 but crystal report 8 is obviously different with crystal report6.
Another thing is that, using crystal report 8 in VB, during the application runtime, is there any code to refresh the report everytime I click a button?
Thanks in advance!
Crystal Report With CRViewer
I want to know that how can i view crystal report in VB...
I have installed Crystal Report 8.0 and vb 6.0..
I require few lines of code fo this.......
Plz send me the required code...
thanx
Crystal Report!8 CRViewer.dll With VB 6.0
I have the following code:
Dim CRXApplication As New Craxdrt.Application
Dim CRXReport!As Craxdrt.Report!
Dim CRXDatabase As Craxdrt.Database
Set rsRecord = New ADODB.Recordset
strSQL = "SELECT * from Customer where Cust_Id = " & "'" & txtCustID.text & "''
Set rsRecord = cnADO.Execute(strSQL)
Set CRXReport!= CRXApplication.OpenReport(App.Path & "Customer.rpt", 1)
Set CRXDatabase = CRXReport.Database
CRXDatabase.SetDataSource rsRecord, 3, 1
CRXReport.PaperSize = crPaperA4
CRXReport.Database.SetDataSource rsRecord, 3, 1
frmPrint.CRViewer1.ReportSource = CRXReport!
frmPrint.CRViewer1.ViewReport!
But i need to print the report!direct to printer automaticaly, without show the preview in the screen.
I am using CRViewer.dll control.
Thanks
ilich
Crystal Report / ADO / CRViewer HELP!!!!
hi folks,
following problem: I designed my reports with ADO connecticity, because the decision wether I'm using Microsoft Access or MS SQL will be made at runtime. So I'm using following piece of code:
Dim t as DatabaseTable
set m_appTheApp = nothing
set m_appTheApp = new CRAXDRT.Application
set m_crRep = new CrystalReport1
Screen.MousePointer = vbHourglass
'set m_rpt = nothing
'set CRVwr.ReportSource = nothing
set m_rpt = m_appTheApp.OpenReport(m_ReportFileName) 'open a report
for Each t In m_rpt.Database.Tables
Debug.print t.Name
t.SetLogOnInfo ConnectionString, Database, Password
Debug.print t.LogOnDatabaseName
Debug.print t.LogOnServerName
Debug.print t.DllName
't.TestConnectivity
next
This works fine for the first time the report is loaded, but if i reload the report during runtime I got at first a message-box, which has no contain (very strange) and then a messagebox which told me that the server has not opened yet. I thought i could solve this problem with the Report.Database.LogOnServer-Method. But if add this line of Code to my source i've got the "Server not opened yet" message at this line of code. There is no different wether i'm using Jet.Engine or SQL.
If anyone has an idea, please write me. I'm already tried everything except a black magic ritual
Thanks
Akademos
Calling Crystal Report 9 With CRViewer From VB6
How to calling a CR 9 report file using CRViewer9 object from VB6?
because CRViewer9 object's property are totally different than CrystalReport's object like on VB5 (crystl32.ocx) so i don't know how to set up for calling CR9 report.
Progress Bar (on CRViewer) On Crystal Report Creation
I have a CRViewer and placed a progress bar on it to show the progress of the report creation as some of them need plenty of time due to the volume of data.
The fact that the recordset is not 'looped' since we use
Code:
crxRpt.Database.SetDataSource rs
lets me no option in dealing with the bar's progress.
is there another way of achieving this?
thanxs in advance.
Printer Icon In Crystal Report 10 (Crviewer)
i need help regarding CR10. how can i set the printer icon in CR10(CRviewer) where i can choose the type of printer and how to set the paper if it is landscape or portrait? kindly help...
Edited by - edd_hills on 4/29/2006 5:56:14 AM
Passing Pwd To Crystal Report Through Code To Generate Report On Pwd-protected Db
Hi everyone.
Now, I need to pass password to a report in run-time and generate it. I am using Crystal reports 8.5 and my database (from which I intend to generate report) is db-password protected. My project works very fine after the addition of 'Jet OLEDBatabase Password=myPwd' in the open string.
Please help me as I am in the middle of nowhere. I need to have a code on opening a report by passing the pwd from code and then open it using filters users prefer.
Thanks in advance.
Chirohorit
Help Needed In Viewing Crystal Report Through CRViewer Control In VB
Please Help.
I am a VB6 Programmer, but Iam new to Crystal Reports. Iam tyring to view a .rpt file using the CRViewer control in VB. The Report is not showing in the CR Viewer control and each time I click the refresh button or print button, it gives a message EServer has not yet been openedE
I am using a password protected MsAccess database. The version of crystal report is 8.5. Could u please tell me how to connect the database to the crviewer.. Iam pasting the source code below..Kindly help.
============================
Dim Appl As New CRAXDRT.Application
Dim cr As New CRAXDRT.Report
Private Sub Form_Load()
If rec1.State = 1 Then rec1.Close
rec1.Open "select * from clientmaster order by clientname", db, adOpenDynamic
Set cr = Appl.OpenReport(App.Path & "ReportsClientlist.rpt")
cr.Database.SetDataSource rec1, 3, 1
CRViewer1.ReportSource = cr
CRViewer1.ViewReport
End sub
==============================
Exporting Crystal Reports 10.0 Report To Excel Using CRViewer In VB6
I have a VB6 application that connects to an SQL Server 2000 database that is sold to clients with Crystal Reports (developed in CR10.0) imbedded in the program. On my development machine (which has CR10 installed on it) all of the exporting functions work properly. When I deploy to the client they get a VBCritical Error message "Failed to Export the Report" when they try to Export the reports using the "Excel 97 - 2000" option, the "Excel 97 - 2000 (data only)" option does not generate the error message. I have gone over the list of dll's and honestly have no idea as to what I am missing. I am thinking that it has to be a dll issue but I cannot find any documentation from CR anywhere regarding which dll does what. The crxf_xls and crxf_xls_res_en dlls are in my install package along with a whole host of others from Crystal Reports but I am apparently missing at least one. Would anyone know which one it is that I am missing or have an idea where I can get info on what each of these dll's do?
Passing Crystal Report Or Viewer A Value Used For Filtering The Report
I having a problem trying to filter out my crystal report based on a case number which is a primary key in my access table tblCaseInfo. I am trying to do this through vb.net so when the user is viewing a particular case they can click the print button and print only that particular case being viewed. The case number will be coming from a textbox (txtCaseNumber.text) on the form in vb.net.
As of right now when the print button is clicked every case in the database is displyed in the crystal report viewer to be printed.
I have three tables involved:
tblCaseInfo - VictimID, AssailantID are foreign keys for the table listed below
tblVictimInfo - VictimID Primary Key
tblAssailantInfo-AssailantID Primary Key
Only code I have so far:
Private Sub btnPrintSurveyReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintSaveSurveyReport.Click
frmSurveySummaryReportInstance.ShowDialog()
End Sub
Passing Parameters To The Data Report
How can I pass parameters when I use the Data Report? For example I have a data base command that I use to find the records for a certain day. I would like to send the day to the command to run a Data Report for that day.
Passing Parameters To Data Report
URGENT.. need to finish this today..
Hi guys,
I m using Data Report in Vb6 to generate my reports which are in my access database.
The problem i m havin is i dont know how to pass parameters from vb to my access view.
here is the SQL code that i used in my access
ItemMovement:
Code:
PARAMETERS CodeFrom IEEEDouble, CodeTo IEEEDouble;
SELECT I.ItemLookupCode, I.Description, Sum(TE.Quantity) AS SumOfQuantity, Sum(TE.Total) AS SumOfTotal, I.LastSold, I.Cost, I.Quantity AS OnHand, I.Quantity*I.Cost AS TotalCost, I.LastReceived
FROM Item AS I, TransactionEntry AS TE
WHERE I.ID BETWEEN CodeFrom AND CodeTo
GROUP BY I.ItemLookupCode, I.Description, I.LastSold, I.Cost, I.Quantity, I.Quantity*I.Cost, I.LastReceived;
The other problem is i dont see my view (ItemMovement), in the drop down box in the property of the command in the data environment.
So could you guys please help me.
Thanks in advance..
Should Be Simple, But Still Eludes Me - Passing Parameters To A Report
I have a report which is based on the following SQL query:
Code:
SELECT Book.ISBN, Book.Title, Book.Author, Book.Format, Book.Price, COUNT(BookOrder.BookISBN) AS BookCount, MAX(Order.DateCreated) AS LastSold, ((Book.Price)*COUNT(BookOrder.BookISBN)) AS TotalIncome
FROM Book, BookOrder INNER JOIN [Order] ON BookOrder.OrderID=Order.OrderID
WHERE Order.DateCreated>[StartDate] And Order.DateCreated<[EndDate] And Book.ISBN=BookOrder.BookISBN
GROUP BY Book.ISBN, Book.Title, Book.Author, Book.Format, Book.Price
ORDER BY COUNT(BookOrder.BookISBN);
As you may be able to see, the two parameters StartDate and EndDate control what is returned. I have a form with a commandbutton under which there is the following code, generated by the control wizard.
Code:
Private Sub BtnPreview_Click()
On Error GoTo Err_BtnPreview_Click
Dim stDocName As String
stDocName = "BestSellers"
DoCmd.OpenReport stDocName, acPreview
Exit_BtnPreview_Click:
Exit Sub
Err_BtnPreview_Click:
MsgBox Err.Description
Resume Exit_BtnPreview_Click
End Sub
Now, when the button is clicked, the report does open, but in doing so two consecutive inputboxes are displayed on the screen asking for the values of StartDate and EndDate. I wish to pass the values of these parameters programmatically so the inputboxes do not appear. I have tried a couple of things with zero success - either having no effect (inputboxes still appear) or causing an error.
I'm sure its one of those things which is super-simple once you know how. If you need any further information about the project dont hesitate to ask.
TIA
Save Report (.rpt) After Passing Parameters To Sql Query
I have the following problem:
I create a rpt file(using CR design windows in VB enviroment) passing the parameter "year" to an ado-command (sql query)with the statement:
Dim Rep as New MyReport
'MyReport is the name of the CR design window
Rep.ParameterField(1).SetCurrentValue year
Then I save the report with the statement:
Report.Save "...Report.rpt"
When I open the file I don't see the data filtered by parameters but I only see the report template.
TIA.
Passing Parameters To Access Report Failed
hi,
there are already samples how to pass parameters to access report and i am using one of them:
acapp.DoCmd.OpenReport "rptDetails", acViewPreview, , INV = "158"
however i am getting errors like 'variable not defined' on 'type mismatch'
so what is the proper syntax/apostrophes to pass a value...
(INV is a text field on my report)
Save Report (.rpt) After Passing Parameters To Sql Query
I have the following problem:
I create a rpt file(using CR design windows in VB enviroment) passing the parameter "year" to an ado-command (sql query)with the statement:
Dim Rep as New MyReport
'MyReport is the name of the CR design
'window
Rep.ParameterField(1).SetCurrentValue year
Then I save the report with the statement:
Report.Save "...Report.rpt"
When I open the file I don't see the data filtered by parameters but I only see the report template.
TIA.
Parameters In Crystal Report
hi,
i want to print a report on the basis of what user enters in a text field. i have written the sql statement in crystal report but i dont know how to declarea variable in CR. and how to tranfer the value of text box to that variable... so that when i call the printreport, the sql statement executes with that value..
please help.....
thanx..
Crystal Report 7 (Parameters)
I have a crystal report that I am editing. It's run though a website which then creates a PDF file with the results. The problem i'm having is I need to create a parameter from one of criteria selected while setup up the report on the website. I don't have access to any of the code the website uses when it runs the report so I can't modify it to pass in any parameters. It might already pass this value to the report, but I have no idea how to setup a parameter to access this value, or even know that it exists or it's called.
I'm using Crystal Reports 7 and i'm pretty much a newbie with CR.
Any help appreciated. Thanks.
(BTW the system we are using is Kronos)
Crystal Report Parameters
I am trying to open up a crystal report threw vb and as part of that i am trying to pass in 2 date parameters.
The report appears but there is no data available, but when i run the report within the crystal reports app, i do get data back.
My code is this :
Private Sub cmdGo_Click()
Dim stParam As String
fra1.Visible = False
frmViewer.Height = 10000
frmViewer.Width = 15140
frmViewer.Top = 650
frmViewer.Left = 100
If optType(1).Value = True Then
DateFrom = cboFrom.Value
DateTo = cboTo.Value
End If
Dim CRXApplication As New CRAXDRT.Application
Dim CRXReport As CRAXDRT.Report
Dim CRXDatabase As CRAXDRT.Database
Set CRXReport = CRXApplication.OpenReport(APPConst.DatabasePath & stReport & ".rpt")
Set CRXDatabase = CRXReport.Database
SQL$ = "Select * From " & stTable
SQLRecs.Open SQL$, cn, adOpenStatic
CRXReport.DiscardSavedData
CRXDatabase.SetDataSource SQLRecs, 3, 1
Dim crpParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim crpParamDef As CRAXDRT.ParameterFieldDefinition
CRXReport.EnableParameterPrompting = False
Set crpParamDefs = CRXReport.ParameterFields
For Each crpParamDef In crpParamDefs
With crpParamDef
Select Case .ParameterFieldName
Case "DateFrom"
.ClearCurrentValueAndRange
.SetCurrentValue DateFrom
Case "DateTo"
.ClearCurrentValueAndRange
.SetCurrentValue DateTo
End Select
End With
Next
SQLRecs.Close
crViewer.ReportSource = CRXReport
crViewer.Height = 9400
crViewer.Width = 14900
crViewer.Top = 50
crViewer.Left = 50
crViewer.ViewReport
I have tried passing the dates in with some formatting but still with no luck.
Can anyone advise.
Thanks
Ian.
Sub Report Parameters Crystal 8.5 In VB
Here is my code
Private Sub Form_Load()
Me.WindowState = vbMaximized
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Dim crpParamDef As CRAXDRT.ParameterFieldDefinition
For Each crpParamDef In Report.ParameterFields
Select Case crpParamDef.Name
Case "{?Location}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtLocation.Text))
Case "{?Master Company}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtCoID.Text))
Case "{?Date From:}"
crpParamDef.AddCurrentValue CDate(frmStartAveTurnaroundTime.txtStartDate.Text)
Case "{?Date To}"
crpParamDef.AddCurrentValue CDate(frmStartAveTurnaroundTime.txtEndDate.Text)
Case "{?Local company}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtCoID.Text))
Case "{?Appraiser}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtAppID2.Text))
Case "{?Assignment Type}"
crpParamDef.AddCurrentValue (frmStartAveTurnaroundTime.DataCombo3.Text)
End Select
Next
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
Set Report = Nothing
End Sub
--------------------
I need to somehow also pass 3 parmeters to the sub report from my VB viewer form. I can't seem to get the info from the Crystal help file.
Thanks for any and all help--this is driving me nuts
Crystal Report Parameters
Hi
I need help - preferably in code form as how I can pass the parameters to a Crystal Report Query (below) from text boxes in a form.
SELECT * FROM $ACCOUNT_TREELIST$$(1,0,NULL,(?param1), (?param))
Both paramaters are numbers.
Any help would be appreciated.
Thank
Cathal
Crystal Report Parameters
Hi,
I have a problem with the parameters passing.
Suppose you have a report that contains three sub reports. These sub reorts are linked to the main report columns. But the main report requires two string parameters to be passed.
How can I pass parameter values to the report. Currently I am using the Report.ReplaceSelectionFormula property to do but it is not the correct way to do things :-)
So Can you guide me on how to do it ?
Thanks,
Krogoth!
FSM
Crystal Report Parameters
Hi
I hope someone can help me with this problem. I've created a Crystal Report within the Crystal Report Software environment. I placed a parameter field called WorkOrder on my report to filter the report by work order. Now I want to call the report from VB, I placed a crystal viewer on my form and a text box to enter the Work order number. Here is the code that I have so far under a command button. When I click the button, I get the error number 9. "Subscript out of range". What am I doing wrong? Do I have the wrong parameter number? If so how can I find out the index of the parameter?
I've been working on this for 2 days now and I just can't see what is wrong
Thanks for any help.
Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Set rdApp = CreateObject("Crystalruntime.application")
Set rpt = rdApp.OpenReport("c:VB Call Log 2 improvementsCallLog.rpt")
rpt.ParameterFields(0) = "WorkOrder;" & frmMain.Text1.Text & ";True"
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
Crystal Report Parameters
Hi
I have created a report within the Crystal Report software and I have placed a parameter field called WorkOrder on the report so that I can filter based on work order number. I want to open this report within VB, I have placed a crystal report viewer, a text box for users to enter a work order number and under a command I have this code
Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Set rdApp = CreateObject("Crystalruntime.application")
Set rpt = rdApp.OpenReport("c:VB Call Log 2 improvementsCallLog.rpt")
rpt.ParameterFields(0) = "WorkOrder;" & frmMain.Text1.Text & ";True"
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
When I click this button, I get Error number 9 "Subscript out of range", reading the help files it would seem that the parameter index might be wrong. If it is wrong, how can I find out the index of it? Or is it something in my code? I have no clue, I've been working on this for 2 days. Can anyone help?
Crystal Report Parameters.
Just a quick question, that i'm hoping someone can help with..
Is there a way of finding out the parameter information from the report file (.rpt) ?
I need to interrogate the report file and determine this, so that i can prompt the user for the parameter information, when setting up some scheduling.
Thanks in advance
Passing Display Only Parameters To A MSAccess Report - Supressing Warning Message Fro
Hi all,
I'm using the following article as a base for my application
to print preview MSAccess reports from VB6:
HOW TO: Use Automation to Print Microsoft Access Reports in Access 2000
http://support.microsoft.com/?id=210132
Specifically I'm using the Run-Time Version of Microsoft Access.
To be able to pass parameters to Reports I must retrieve the Record Source
for the report
and change the PARAMATERS clause like:
PARAMETERS rptCriteria TEXT = (No Report Criteria);
Select * from tblCompanys;
to
PARAMETERS rptCriteria TEXT = 'Company: Microsoft';
Select * from tblCompanys;
To do this I MUST open the report in DESIGN mode NOT PREVIEW.
And since I'm using the Run-Time Version of Microsoft Access
I get a message on:
objAccess.DoCmd.OpenReport strRptName, acDesign, strFilter, strWhere
'You do not have exclusive access to the database at this time.
If you proceed to make changes you may not be able to save them'
Does anyone know how to suppress this message?
Preferably with a commandline argument like /silent when I shell to the
Run-Time Version of Microsoft Access.
Passing Display Only Parameters To A MSAccess Report - Supressing Warning Message From Run
Hi all,
I'm using the following article as a base for my application
to print preview reports:
HOW TO: Use Automation to Print Microsoft Access Reports in Access 2000
http://support.microsoft.com/?id=210132
Specifically I'm using the Run-Time Version of Microsoft Access.
To be able to pass parameters to Reports I must retrieve the Record Source
for the report
and change the PARAMATERS clause like:
PARAMETERS rptCriteria TEXT = (No Report Criteria);
Select * from tblCompanys;
to
PARAMETERS rptCriteria TEXT = 'Company: Microsoft';
Select * from tblCompanys;
To do this I MUST open the report in DESIGN mode NOT PREVIEW.
And since I'm using the Run-Time Version of Microsoft Access
I get a message on:
objAccess.DoCmd.OpenReport strRptName, acDesign, strFilter, strWhere
'You do not have exclusive access to the database at this time.
If you proceed to make changes you may not be able to save them'
Does anyone know how to suppress this message?
Preferably with a commandline argument like /silent when I shell to the
Run-Time Version of Microsoft Access.
Doubt In Crystal Report 9.0 Parameters
hi,
i'm using cr 9.0 & vb 6.0. here, i dont no how to send the query without asking parameters in vb design time. i.e., when i click
the command button it has to retrieve the particular user name details. plz help me to sort out this pbm.
regards
chitra.
How To Pass Parameters From VB6 To Crystal Report 8?
Good day everybody!
just like to find out whether is it possible for me to pass a parameter from Visual Basic 6 to Crystal Report 8 Professional version??
is it true that only the developer version of CR8 can do passing of parameters??
thanks for all your time!!
Pass Parameters In VB6 To Crystal Report 8.5
Hi Babu,
I hava a problem about pass a parameter in VB6 to Crystal Report 8.5 that need your helping. When I add Crystal Report 8.5 control in VB6 then I got a CrystalReport1 and Form1 . I want to design a form in VB incluses 2 textbox that allow user type StartDay and EndDay. User can click Preview button to view report. Can I type code in VB form or Form1? How do I pass parameter?Please give me a detail code.Thank you for your helping.
|