 |
|
 |
Hi all,
I'm kinda new in VB.net. I'm using VS 2008 and crystal report 9. I have tried to pass a boolean parameter to crystal report but everything is not working. i want to disable the parameter prompting! I have tried the way that kennedy_franklin suggested, titled 'How to pass discrete parameters to Crystal Reports' but still failed.
i got error: "'ParameterFieldInfo' is not the member of ...."
when i put "viewRpt.ParameterFieldInfo = paramFields" in my form. Here is my code:
Dim paramFldDefs As ParameterFieldDefinitions
Dim paramFldDef As ParameterFieldDefinition
Dim paramVal As New ParameterValues
Dim paramDisVal As New ParameterDiscreteValue
Dim paramFields As New ParameterFields
Dim paramField As New ParameterField
Dim rpt As New rptMyReport
Dim viewRpt As New frmReportViewer
paramFldDefs = rpt.DataDefinition.ParameterFields
paramFldDef = paramFldDefs.Item("pmPubDate")
paramVal = paramFldDef.CurrentValues
paramDisVal = New CrystalDecisions.Shared.ParameterDiscreteValue
paramDisVal.Value = rbnPDate.Checked
paramVal.Add(paramDisVal)
paramFldDef.ApplyCurrentValues(paramVal)
1) how to disable the parameter promting?
2) how to link the above code with my viewRpt and rpt?
3) im using dataset to populate my data into the report.
4) the above code i put in my form. should i put in my report viewer?
any help is greatly appreciated!
|
|
|
|
 |
|
 |
It worked for me. Thanks.
|
|
|
|
 |
|
 |
very professional approach. easy and logical
|
|
|
|
 |
|
 |
how to use this project in a existing project
i m new to vb.net
i tried many times but all in vein...........
please anybody help me......
thanks
jitender
|
|
|
|
 |
|
|
 |
|
 |
Hi Franklin Kennedy,
Excelent solution to view the report, but I am trying to export the report to PDF for every record, then I need to use some like:
dim rpt1 as Crystaldecisions.CrystalReports.Engine.ReportDocument()
.
.
.
rpt1.exporttodisk.......
in rpt1. i do not see an option for Parameterfieldinfo = Cryrepcontrol1.Paramfields
Thanks in advance for your help.
Raul
|
|
|
|
 |
|
|
 |
|
 |
Can you provide an example form with your demo, I am having alot of trouble following this.
|
|
|
|
 |
|
 |
Hello Friends, I have stuck! I have a table called "Employee" in which I have many employees information. I want to view the crystal report of individual employee which i want to see not all the employee at a time. Please help me out. Thanx Arbind Prasad
|
|
|
|
 |
|
 |
on report wizard select drop table and group by EmployeeID and when view the report dbl clk on the individual employee you want.
|
|
|
|
 |
|
 |
First to create a recordformula,
For creating selection formula , Right click on Crystal Reports designer window , select REPORT -> SELECTION FORMULA -> RECORD .
Then you can see the record Selection Formula Editor. This for entering the selection formula. For that you have to select the fields from above fields and make the formula .
First you have to select OrderMaster.OrderMaster_customername from Report Field and select the comparison operator and select the parameter field. Double click each field then it will be selected.
Now the designing part is over and the next step is to call the created Crystal Reports in VB.NET through Crystal Reports Viewer control .
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim cryRpt As New ReportDocument
cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue As New ParameterDiscreteValue
crParameterDiscreteValue.Value = TextBox1.Text
crParameterFieldDefinitions = -
cryRpt.DataDefinition.ParameterFields
crParameterFieldDefinition = _
crParameterFieldDefinitions.Item("Customername")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.Refresh()
End Sub
End Class
|
|
|
|
 |
|
 |
How can I pass multiple parameter values for 1 parameter in crystal 10 for ASP (not .net)?
Example: multi select list box for state
|
|
|
|
 |
|
 |
the zip solution is in vb ... can i do that in c# .NET?
|
|
|
|
 |
|
 |
Hi all
This is my first posting and hope to get a reply.
I have a main report which takes only one parameter. The 2 subreports inturn use this parameter, which is linked from the main report during design time.
My problem here arises when i try to set the parameter to the report. the "objReport.DataDefinition.ParameterFields.Count" includes the count of subreport parameters, and hence i get a error when i try to assign parameter values depending on the count.
How do i exclude the subreport parameter count, so that i actually send in parameters only to the main report using the "count" of them.
I am using VB.net 2003 and crystal report 9
Thanks in advance
|
|
|
|
 |
|
 |
im using vb.net to create a crystal report. when i passing a parameter to the repot and compile, i face an error indicate that "Buffer too small for string or missing null byte". Does anyone know what this error mean and how to solve it? is urgent for me. thank you in advance.
|
|
|
|
 |
|
 |
Hi,
My question is:
I can use cryscontrol on web application (asp.net vs 2003)?
Thanks
Vladimir
|
|
|
|
 |
|
 |
I got following error in my vb.net form while I am trying to put control on it.
An exception occured while trying to create an instance of crystalcontrl.cryrepcontrol. The exception was 'file or assembly name crystal decision shared or one of its dependencies was not found'
What I am missing.
Thanks in advance.
Hardik Shah
|
|
|
|
 |
|
 |
Does anyone know of a way to add data to the report with out overwriting the data the is currently there.
I'm trying to add the results from a SELECT statment from my database. I'm using MySQL as a db
Thanks....
|
|
|
|
 |
|
 |
i have created cascading parameter prompt in my report.(program_id->product_id)
now i want to pass program_id through vb.net code(ONLY).the report should display the product_id based on that program_id.
Surruchie
|
|
|
|
 |
|
 |
I would like to know this as well....
|
|
|
|
 |
|
 |
I have received you email but i didn't understand your word. I mean could you explain me in detail. I am use the both tables fields in report like this
//Report Header
College Name
College Address
//Page Header
Student Id (1) // From Master Table
Student Name (Muhammad Waqas Butt)//From Master Table
//Detail
Student ID | Student Fee
=========================
1 | Rs 1,000
1 | Rs 1,000
1 | Rs 1,000
1 | Rs 1,000
=========================
//Page Footer
Line
//Report Footer
Summary Total Fee: total of column fee
Please tell me in detail. I'm waiting for your response.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
 |
|
 |
Hi,
Could you please tell me how i show report contents on the bases of any input. I mean i have two tables [Stduent Master and Student Detail] one table have a field Student ID which is primary key and has two more field [ Student Name, Student Class]. In table two i have three record and Student Id as well, Now i want to show those record from Student Detail which have Student ID same in Crystal Report Detail Section.
StudentMaster.Student_id = StudentDetail.Student_ID
//Report Format
//Report Page Section
Student ID //From Master Table
Student Name //From Master Table
//Report Detail Section
Student ID | Student Fee Month | Student Fee
==============================================
1 | Jan | Rs 1,000
1 | Feb | Rs 1,000
1 | Mar | Rs 1,000
1 | Apr | Rs 1,000
==============================================
May be you got my points.Sorry for the Englis.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
 |
|
 |
Hi,
Could you please tell me how i show report contents on the bases of any input. I mean i have two tables [Stduent Master and Student Detail] one table have a field Student ID which is primary key and has two more field [ Student Name, Student Class]. In table two i have three record and Student Id as well, Now i want to show those record from Student Detail which have Student ID same in Crystal Report Detail Section.
StudentMaster.Student_id = StudentDetail.Student_ID
//Report Format
//Report Page Section
Student ID //From Master Table
Student Name //From Master Table
//Report Detail Section
Student ID | Student Fee Month | Student Fee
==============================================
1 | Jan | Rs 1,000
1 | Feb | Rs 1,000
1 | Mar | Rs 1,000
1 | Apr | Rs 1,000
==============================================
May be you got my points.Sorry for the Englis.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
 |
|
 |
Nowadays, I develop a win app to publish for some writer, now, I need theway to print the page like dictionary page, i.e. the page will be split to two parts,(I'm not ask for How to paging !),,,,the data source is a Dataset, the target is crystal report v10,,,
I think to do this work with out crystal report(i have no expriance with it) by using some local fields upper and lower bound( I do that befor, when i developed guestbook using XSLT),,,,
...
Regards..
|
|
|
|
 |
|
 |
I am converting from crystal 8.5 to crystal 9. and I am having a problem setting up the automatic print using crystal 9.
Here is my code
Crystal 8.5
Sub printRPT(RptName)
Dim cr 'As Crystal.CrystalReport
Set cr = CreateObject("Crystal.CrystalReport")
cr.ReportFileName = RptName
cr.OpenReport(RptName)
cr.CopiesToPrinter = 1
cr.PrintFileType = 7 ' crptCrystal
cr.Destination = 1 ' crptToPrinter
cr.Action = 1
End Sub
How to get crystal 9 work ?
Here are some code but I am stucked
Sub printRPT(RptName)
Dim cr 'As Crystal.CrystalReport
Set cr = CreateObject("CrystalRuntime.Application.9")
cr.OpenReport(RptName)
.....
....
End Sub
Please help,, thanks
|
|
|
|
 |