473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Convert .rpt to .pdf format?

How can I convert Crystal Report file (.rpt) to pdf format in Visaul
Basic 6?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
6 20909
Hi Jde,

If you can print your Crystal Report from Windows Explorer, and have a
PdfWriter printer driver, then you can use something like:

'In Shell.vb
Imports System.Diagnostics
Public Class Shell
Public Shared Sub Print (sFileName As String)
Dim p As New ProcessStartInfo()
p.FileName = sFileName
p.Verb = "print"
p.UseShellExecute = True
p.WindowStyle = ProcessWindowStyle.Hidden 'This may have no effect
Try
Process.Start(p)
Catch e As Exception
MsgBox ("Couldn't print " & p.FileName & vbCrLf & e.Message)
'or
Throw New Exception ("Couldn't print " & p.FileName, e)
End Try
End Sub
End Class

'Elsewhere
Shell.Print ("C:\Exciting\Some_Crystal_Report.rpt")

Regards,
Fergus
Nov 20 '05 #2
Hi Fergus,

I don't think this answers the issue. First, I see no conversion to .pdf -
to print the cr report and convert it inside cr is trivial, and he's not
asking that. Also, why should he need a pdfwriter driver? If you can
convert to .pdf inside cr, then cr has the driver internally, no? And since
you can do this inside cr, there must be a way to code it as part of the
object model of the reportdocument.

Bernie Yaeger

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
Hi Jde,

If you can print your Crystal Report from Windows Explorer, and have a
PdfWriter printer driver, then you can use something like:

'In Shell.vb
Imports System.Diagnostics
Public Class Shell
Public Shared Sub Print (sFileName As String)
Dim p As New ProcessStartInfo()
p.FileName = sFileName
p.Verb = "print"
p.UseShellExecute = True
p.WindowStyle = ProcessWindowStyle.Hidden 'This may have no effect Try
Process.Start(p)
Catch e As Exception
MsgBox ("Couldn't print " & p.FileName & vbCrLf & e.Message) 'or
Throw New Exception ("Couldn't print " & p.FileName, e)
End Try
End Sub
End Class

'Elsewhere
Shell.Print ("C:\Exciting\Some_Crystal_Report.rpt")

Regards,
Fergus

Nov 20 '05 #3
Hi Bernie,

|| I see no conversion to .pdf - to print the cr report and convert it
|| inside cr is trivial

Sorry, Bernie I'm not sure I understand what you're saying. I've never
used Crystal Reports and have no idea what it can do. Are you saying that it
can convert to Pdf ??

|| Also, why should he need a pdfwriter driver?

The PdfWriter <printer> driver catches output printed from any program and
writes it to a Pdf file. This means that you don't need to have Pdf-capable
programs. Any program that prints can create a Pdf file.

My solution is a non-Crystal Reports one and is a fall-back assuming that
no-one else comes forward with a direct one. If Crystal Reports can handle
Pdfs internally, then sure, automation is the best way.

Regards,
Fergus
Nov 20 '05 #4
Cor
Hi Fergus,
How can I convert Crystal Report file (.rpt) to pdf format in Visaul
Basic 6? I know very few from VB6, does this work Try
Process.Start(p)
Catch e As Exception
MsgBox ("Couldn't print " & p.FileName & vbCrLf & e.Message) 'or
Throw New Exception ("Couldn't print " & p.FileName, e)
End Try

:-))))))))
Cor
Nov 20 '05 #5
"Jde001 jd001" <ke******@yahoo.com> schrieb
How can I convert Crystal Report file (.rpt) to pdf format in
Visaul Basic 6?


This is a VB.NET group (see group name). For older versions please turn to
one of the microsoft.public.vb.* groups.
--
Armin

Nov 20 '05 #6
Morning Cor,

LOL. Oops. Missed the VB6 bit!! :-)

Regards,
Fergus
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
4
by: aevans1108 | last post by:
expanding this message to microsoft.public.dotnet.xml Greetings Please direct me to the right group if this is an inappropriate place to post this question. Thanks. I want to format a...
2
by: Franck | last post by:
Hi, 'm gettin mad about date conversion. Here is the point. Got and add-in for Excel which call functions from a web service (on a remote server) The remote server has regional settings...
2
by: Joebloggs | last post by:
Hi I am trying to do an ldap lookup. I can pick up the domain name in the standard format DOMAIN\USERNAME. The problem is the company I work for expects the query in the format DOMAIN:USERNAME....
1
by: abcabcabc | last post by:
I write an application which can let user define own date format to input, How to convert the date string to date value with end-user defined date format? Example, User Defined Date Format as...
2
by: kirke | last post by:
Hi, I have a datetime column named dtDateTime. its format is "Oct 27 2006 12:00:00 " I want to group by only date part of it and count my code is $sql1="SELECT ...
4
by: Ashraf Ansari | last post by:
Hi, How Can I convert MM/dd/yyyy format into dd/MM/yyyy and the date which is converted into dd/MM/yyyy should be in DateTime format. I do not want to store it as a string. Please help ...
4
by: thomasc1020 | last post by:
This is regarding VB.NET 2003. Variable 'Date' is a string and it contains date information in this format: "DEC/05/2007". Now I am trying to convert the format as "2007-12-05". Is it...
5
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.