School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
You're Browsing As A Guest! Register Now...
Become an Expert!

Join 358,767 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,812 people online right now.Registration is fast and FREE... Join Now!



Crystal Report

52 Weeks of Code Challenge: Android

Week #11 of the 52 Weeks of Code Challenge is Android, you should give it a shot. Click Here!

Crystal Report Rate Topic: -----

#1 masipro  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 1
  • View blog
  • Posts: 103
  • Joined: 08-July 08


Dream Kudos: 0

Post icon  Posted 27 August 2008 - 01:54 AM

Hai,
Using VB6 i code to add and display Crystal report. The printing option works only we click the icon in menu bar. when I used to Press 'Ctrl+P', it won't work in the form as how it works usually in Cryastal Report Application.
Please let me have function of 'Ctrl+P' in VB itself. My coding is as follows


Private Sub cmdprint_Click()

If IsNull(dtcCustomer.Text) Then MsgBox "Select Customer ": dtcCustomer.SetFocus: Exit Sub
If Combo1.Text = "Clicking" Then
	 If Not dtcCustomer.Text = "Bostonian" Then
	Selected_Report_Path = "E:\log\CheckList-Upper.rpt"
	Else
	Selected_Report_Path = "E:\log\CheckList -Upper(Bost).rpt"
	End If
	
	If Selected_Report_Path <> Empty Then
	Dim crystal As CRAXDRT.Application
	Dim report As New CRAXDRT.report
	
	Set crystal = New CRAXDRT.Application
	Set report = crystal.OpenReport(Selected_Report_Path)
	report.ParameterFields(1).AddDefaultValue dtcCustomer.Text
	report.ParameterFields(2).AddDefaultValue txtOrderNo.Text
	report.ParameterFields(3).AddDefaultValue dtcPlanNo.Text
	report.ParameterFields(4).AddDefaultValue "Upper Leather 1"
	report.DiscardSavedData

	CRViewer91.ReportSource = report
	CRViewer91.ViewReport
	CRViewer91.EnableCloseButton = True
	CRViewer91.EnablePrintButton = True
	
	
	End If
Else

End If


sorry i wrote in 'Computer support & operating system' Group . it is to be in Visual Basic group

This post has been edited by jayman9: 27 August 2008 - 09:45 AM

Was This Post Helpful? 0
  • +
  • -


#2 Jayman  Icon User is offline

  • Student of Life
  • Icon

Reputation: 298
  • View blog
  • Posts: 9,012
  • Joined: 26-December 05


Dream Kudos: 500

Expert In: Everything

Re: Crystal Report

Posted 27 August 2008 - 09:46 AM

Moved to Visual Basic.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month