Hello all,
I am new with Crystal Reports.
I have strange problems.
I created report with parameters and run it from Tomcat.
When i use default parameters window - parameters value which i add don't affect on report result - it uses previous parameters.
If i use custome jsp and add parameters programmatically it's work.
When i try to perform "Search for text" with some text i get:
"ERROR Some parameters are missing values".
If i leave search control empty and perform "Search for text" all work fine - i get parameters window and after this i get report.
Thanks in advance, VitalyWhen assigning value to the parameter make sure you spelled the name correctly and send the proper data that matches to the parameter datatype
Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts
Sunday, March 25, 2012
Crystal reports v9 parameter problems
I have a V9 Crystal report with 2 parameters. It runs fine when I run the report 'directly', however, when I use the same report as a subreport, I cannot pass the two parameters to the subreport -- it comes up blank wihtout an error. 1 parameter works fine, but 2 is a problem.
Any ideas?Did you link the subreport?
If you did, do the parameters between report and subreport have same
type of data?|||The report is not linked -- its imported. I will double check next week (I'm on vacation this week) but am pretty sure var types are matched.sql
Any ideas?Did you link the subreport?
If you did, do the parameters between report and subreport have same
type of data?|||The report is not linked -- its imported. I will double check next week (I'm on vacation this week) but am pretty sure var types are matched.sql
Thursday, March 22, 2012
Crystal Reports Images
I am currently using CrystalReports 9.0 and I was wondering if there is a way to make a picture appear if certain parameters are met. For example, if an employee ID = John Smith, a picture appears. I know how to put a picture on a report as well as how to use a blob field, but I can't seem to find a syntax that when a certain parameter is met, the image appears. The image is a system file. Any help would be appreciated! Thank you!Right click on the image field
Goto Format object and in the suppress click x-2 button and write this code
Parametefield="yourvalue"
Goto Format object and in the suppress click x-2 button and write this code
Parametefield="yourvalue"
Crystal Reports for VS 2005 - Passing SQL Stored Procedure Parameters
I have a report which uses a stored procedure with several parameters which gets loaded into the Report Viewer control. When I run this report on the development machine everything works correctly, but after I publish it to another machine (or even another website on the development machine), I get the message:
Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Procedure or Function 'uspReport_IncidentBrowse' expects parameter '@.departmentid', which was not supplied. SQL State: 42000 Native Error: Failed to open a rowset. Error in File C:\WINDOWS\TEMP\rptincidentbrowse {5F03A03D-6BF9-4121-B68C-06D9C89283A1}.rpt: Failed to open a rowset.
I have other reports which do not have SQL parameters which run fine. All the reports have a parameter for the title line of the report and this is getting set correctly.
I have searched and found numerous examples of how to programatically set parameters... all of which work fine on the development machine, but all produce the result above once the website is published ANYWHERE.
Is this a limitation of Crystal Reports for Visual Studio 2005?IIRC, the license for Crystal Reports included with Visual Studio is for no-production use ONLY. (It's been a while since I have used Crstal, much preferring SQLServer Reporting Services.....)|||According to their license agreement you are allowed to deploy to a production server.
In addition, regardless of licensing issues, I would not be willing to purchase an enterprise (or any other) CR license unless we are able to solve this problem in a proof of concept deployment.
Does anyone have an authoritative answer?
Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Procedure or Function 'uspReport_IncidentBrowse' expects parameter '@.departmentid', which was not supplied. SQL State: 42000 Native Error: Failed to open a rowset. Error in File C:\WINDOWS\TEMP\rptincidentbrowse {5F03A03D-6BF9-4121-B68C-06D9C89283A1}.rpt: Failed to open a rowset.
I have other reports which do not have SQL parameters which run fine. All the reports have a parameter for the title line of the report and this is getting set correctly.
I have searched and found numerous examples of how to programatically set parameters... all of which work fine on the development machine, but all produce the result above once the website is published ANYWHERE.
Is this a limitation of Crystal Reports for Visual Studio 2005?IIRC, the license for Crystal Reports included with Visual Studio is for no-production use ONLY. (It's been a while since I have used Crstal, much preferring SQLServer Reporting Services.....)|||According to their license agreement you are allowed to deploy to a production server.
In addition, regardless of licensing issues, I would not be willing to purchase an enterprise (or any other) CR license unless we are able to solve this problem in a proof of concept deployment.
Does anyone have an authoritative answer?
Tuesday, March 20, 2012
Crystal Reports 9 - end user printing problem
Crystal generates reports based on user parameters from my .asp program. It works fine from all but one users PC. This user prints "chinese" or "garbage" when they hit the print button. It doesn't matter what printer they print to, the screen displays fine, but the report is "garbage." Any suggestions?If it's just the one computer, maybe you need update the printer drivers?
crystal reports (the coder way) ?
Hi
I have a .NET application that needs to obtain the details of the parameters for a crystal report.
I have written some code, that opens a report into the crystal viewer and the gets the parameter info and displays it in a msgbox.
However, the viewer prompts for the parameters, before i get a chance to get the information and display it.:(
My question is, does anyone know of a way that i can get the parameter information from a report, without the user being prompted for the parameters ?
Thanks in anticipation[Moved thread]|||YOu need to populate the parameters to the report before viewing it the viewer or printing it to the printer.
here is a sample from VB on how to populate parameters and formulas.
Dim crFormula As CRAXDRT.FormulaFieldDefinition
Dim crParam As CRAXDRT.ParameterFieldDefinition
crReport.DiscardSavedData
For Each crParam In crReport.ParameterFields
Select Case crParam.Name
Case "{?SortType}"
crParam.AddCurrentValue m_strSortType
End Select
Next crParam
For Each crFormula In crReport.FormulaFields
Select Case crFormula.Name
Case "{@.StartDate}"
crFormula.Text = "DATE( 2001, 01, 01)"
Case "{@.EndDate}"
crFormula.Text = "DATE( 2002, 03, 30)"
crFormula.Text = """All Offices"""
Case "{@.DetailOrSummaryFlag}"
crFormula.Text = """" & m_strSummaryDetailFlag & """"
Case "{@.Seperate}"
crFormula.Text = """FALSE"""
Case "{@.SetShowWarning}"
crFormula.Text = """FALSE"""
Case Else
'do nothing
End Select
Next crFormula|||Hi
I have a .NET application that needs to obtain the details of the parameters for a crystal report.
I have written some code, that opens a report into the crystal viewer and the gets the parameter info and displays it in a msgbox.
However, the viewer prompts for the parameters, before i get a chance to get the information and display it.:(
My question is, does anyone know of a way that i can get the parameter information from a report, without the user being prompted for the parameters ?
Thanks in anticipation
Dim APP As New CRAXDRT.Application
Dim REPORT As CRAXDRT.Report
REPORT = APP.OpenReport("C:\SHIPMENT_SCHEDULE\REPORTS\XL.rpt")
REPORT.EnableParameterPrompting = False
(this is the one you should include...disabling the parameter prompting)
I have a .NET application that needs to obtain the details of the parameters for a crystal report.
I have written some code, that opens a report into the crystal viewer and the gets the parameter info and displays it in a msgbox.
However, the viewer prompts for the parameters, before i get a chance to get the information and display it.:(
My question is, does anyone know of a way that i can get the parameter information from a report, without the user being prompted for the parameters ?
Thanks in anticipation[Moved thread]|||YOu need to populate the parameters to the report before viewing it the viewer or printing it to the printer.
here is a sample from VB on how to populate parameters and formulas.
Dim crFormula As CRAXDRT.FormulaFieldDefinition
Dim crParam As CRAXDRT.ParameterFieldDefinition
crReport.DiscardSavedData
For Each crParam In crReport.ParameterFields
Select Case crParam.Name
Case "{?SortType}"
crParam.AddCurrentValue m_strSortType
End Select
Next crParam
For Each crFormula In crReport.FormulaFields
Select Case crFormula.Name
Case "{@.StartDate}"
crFormula.Text = "DATE( 2001, 01, 01)"
Case "{@.EndDate}"
crFormula.Text = "DATE( 2002, 03, 30)"
crFormula.Text = """All Offices"""
Case "{@.DetailOrSummaryFlag}"
crFormula.Text = """" & m_strSummaryDetailFlag & """"
Case "{@.Seperate}"
crFormula.Text = """FALSE"""
Case "{@.SetShowWarning}"
crFormula.Text = """FALSE"""
Case Else
'do nothing
End Select
Next crFormula|||Hi
I have a .NET application that needs to obtain the details of the parameters for a crystal report.
I have written some code, that opens a report into the crystal viewer and the gets the parameter info and displays it in a msgbox.
However, the viewer prompts for the parameters, before i get a chance to get the information and display it.:(
My question is, does anyone know of a way that i can get the parameter information from a report, without the user being prompted for the parameters ?
Thanks in anticipation
Dim APP As New CRAXDRT.Application
Dim REPORT As CRAXDRT.Report
REPORT = APP.OpenReport("C:\SHIPMENT_SCHEDULE\REPORTS\XL.rpt")
REPORT.EnableParameterPrompting = False
(this is the one you should include...disabling the parameter prompting)
Sunday, March 11, 2012
Crystal Report Parameters
Hi guys, i am new around here, so be gentle!
I am trying to make a crystal report using vb.net 2005. When i add a new item to my website (crystal report) i choose "Add Command". I write the following code:
--------------------
select panathdate from properties where pid=@.id
--------------------
It then asks me to declare @.id. So i write the following:
--------------------
declare @.id integer
select panathdate from properties where pid=@.id
--------------------
and then i add a new parameter named "@.id".
Then, in the code behind of my webpage (after i added a crystalreportviewer) i write the following code:
--------------------
Dim paramField As New ParameterField
Dim pFields As New ParameterFields()
paramField.ParameterFieldName = "@.id"
paramField.CurrentValues.AddValue(Request("id"))
pFields.Add(paramField)
CrystalReportViewer1.ParameterFieldInfo = pFields
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.ReportSource = crReportDocument
--------------------
For some reason, although when i print the @.id it shows the correct number, i cant see the desired record from the database, except a blank report.
Any ideas or a detailed tutorial on how to bring the desired records in the crystal report would be ideal!!
Thanks in advance!Refresh report viewer by calling
CrystalReportViewer1.RefreshReport()
(Please correct the syntax since i am not VB programmer)
I am trying to make a crystal report using vb.net 2005. When i add a new item to my website (crystal report) i choose "Add Command". I write the following code:
--------------------
select panathdate from properties where pid=@.id
--------------------
It then asks me to declare @.id. So i write the following:
--------------------
declare @.id integer
select panathdate from properties where pid=@.id
--------------------
and then i add a new parameter named "@.id".
Then, in the code behind of my webpage (after i added a crystalreportviewer) i write the following code:
--------------------
Dim paramField As New ParameterField
Dim pFields As New ParameterFields()
paramField.ParameterFieldName = "@.id"
paramField.CurrentValues.AddValue(Request("id"))
pFields.Add(paramField)
CrystalReportViewer1.ParameterFieldInfo = pFields
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.ReportSource = crReportDocument
--------------------
For some reason, although when i print the @.id it shows the correct number, i cant see the desired record from the database, except a blank report.
Any ideas or a detailed tutorial on how to bring the desired records in the crystal report would be ideal!!
Thanks in advance!Refresh report viewer by calling
CrystalReportViewer1.RefreshReport()
(Please correct the syntax since i am not VB programmer)
Thursday, March 8, 2012
Crystal report 8.5 help
i m using access 2000 from there i m calling crystal report 8.5 , every thing working fine except one query havib=ng having Criteria with parameters , how to pass this parameter to the Crystal report.
would some body help me
SELECT Assignment.BNo, Trade.Trade, Assignment.Source, Assignment.MobDate, Project.ProjectID
FROM Trade INNER JOIN (Project INNER JOIN (Orders INNER JOIN (Employees INNER JOIN Assignment ON Employees.[Badge Number] = Assignment.BNo) ON Orders.OrderID = Assignment.OrderNo) ON Project.ProjectID = Orders.ProjectID) ON Trade.[Serial No] = Assignment.Trade
GROUP BY Assignment.BNo, Trade.Trade, Assignment.Source, Assignment.MobDate, Project.ProjectID, Month([Assignment].[mobdate]), Year([Assignment].[mobdate])
HAVING (((Assignment.MobDate)=[enter date]) AND ((Month([Assignment].[mobdate]))=Month(Date())) AND ((Year([Assignment].[mobdate]))=Year(Date())))
ORDER BY Assignment.BNo;
this is the queryWhile writing the query, u may have some option to create parameter.
CR 9 has that option. No idea about CR 8.5
would some body help me
SELECT Assignment.BNo, Trade.Trade, Assignment.Source, Assignment.MobDate, Project.ProjectID
FROM Trade INNER JOIN (Project INNER JOIN (Orders INNER JOIN (Employees INNER JOIN Assignment ON Employees.[Badge Number] = Assignment.BNo) ON Orders.OrderID = Assignment.OrderNo) ON Project.ProjectID = Orders.ProjectID) ON Trade.[Serial No] = Assignment.Trade
GROUP BY Assignment.BNo, Trade.Trade, Assignment.Source, Assignment.MobDate, Project.ProjectID, Month([Assignment].[mobdate]), Year([Assignment].[mobdate])
HAVING (((Assignment.MobDate)=[enter date]) AND ((Month([Assignment].[mobdate]))=Month(Date())) AND ((Year([Assignment].[mobdate]))=Year(Date())))
ORDER BY Assignment.BNo;
this is the queryWhile writing the query, u may have some option to create parameter.
CR 9 has that option. No idea about CR 8.5
Crystal Report 8.5 ,VB6.0 -incorrect session parameters
Environment
VB6.0
Crystal Report 8.5
problem :
"Unable to connect: incorrect session parameters." Error Message
I generated my crystal report using PEOAuto. and having above error message when
crystalreport.preview
line is executed.
there is no formulaparameters are passed.
report is generated from crystal report properly, but its not work when i generate report from VB 6.0
pl point me where i am doing mistake.I have an example of VB 6 and CR 8.5 in my signature. It may help you.
VB6.0
Crystal Report 8.5
problem :
"Unable to connect: incorrect session parameters." Error Message
I generated my crystal report using PEOAuto. and having above error message when
crystalreport.preview
line is executed.
there is no formulaparameters are passed.
report is generated from crystal report properly, but its not work when i generate report from VB 6.0
pl point me where i am doing mistake.I have an example of VB 6 and CR 8.5 in my signature. It may help you.
Crystal Report 8 with Vb 6.0 [parameters screen]
Hi,
I m using crystal in vb 60. and showing all the reports from a folder in the list and when user double click any report it ask for parameter which i fine
but if user click on the cancel button on paramter screen then it should exit but still it open the crystal report with blank page.
How i can stop this if user click on cancel button or can i can hide the cancel button on the parameter screen?
Thanks In advanceTry posting this question in the Crystal Reports Forum (http://www.dev-archive.com/forum/forumdisplay.php?s=&forumid=64)|||[ Moved to Crystal Report forum ]
I m using crystal in vb 60. and showing all the reports from a folder in the list and when user double click any report it ask for parameter which i fine
but if user click on the cancel button on paramter screen then it should exit but still it open the crystal report with blank page.
How i can stop this if user click on cancel button or can i can hide the cancel button on the parameter screen?
Thanks In advanceTry posting this question in the Crystal Reports Forum (http://www.dev-archive.com/forum/forumdisplay.php?s=&forumid=64)|||[ Moved to Crystal Report forum ]
Wednesday, March 7, 2012
Crystal Enterprise Question
Hello,
I have a report that I have put in Crystal Enterprise so that users can go and run the report as necessary. The report has 3 parameters that the users will choose when they run the report. One is a location, the other is a date (picks from a calendar), and the other is a boolean to choose if they want a graph printed with the report or not.
Here's my question. I would like to set up this same report as a scheduled job to automatically email to two people each day. I know which facility to put in and true for the boolean parameters, but how can I tell it to do it for the previous date when it's expecting someone to pick from a calendar? Each day's email will have stats from the day before.
I really don't want to have to maintain two reports for this if at all possible.
Thanks for any suggestions!
NMellickPass your date of birth as the date parameter and in the selection formula add code to check the parameter and if it's your b-day then change to todays date minus 1.
I have a report that I have put in Crystal Enterprise so that users can go and run the report as necessary. The report has 3 parameters that the users will choose when they run the report. One is a location, the other is a date (picks from a calendar), and the other is a boolean to choose if they want a graph printed with the report or not.
Here's my question. I would like to set up this same report as a scheduled job to automatically email to two people each day. I know which facility to put in and true for the boolean parameters, but how can I tell it to do it for the previous date when it's expecting someone to pick from a calendar? Each day's email will have stats from the day before.
I really don't want to have to maintain two reports for this if at all possible.
Thanks for any suggestions!
NMellickPass your date of birth as the date parameter and in the selection formula add code to check the parameter and if it's your b-day then change to todays date minus 1.
Subscribe to:
Posts (Atom)