Wrox Programmer Forums
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2003, 05:33 PM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 2 printer issues

I am using the following code to view a crystal report:

        Dim param1 = New CrystalDecisions.Shared.ParameterField()
        Dim ParamVal1 = New CrystalDecisions.Shared.ParameterDiscreteValue()
        Dim paramFields = New CrystalDecisions.Shared.ParameterFields()

        param1.ParameterFieldName = "group"
        ParamVal1.Value = strGroup
        param1.CurrentValues.Add(ParamVal1)

        paramFields.Add(param1)

        Dim param2 = New CrystalDecisions.Shared.ParameterField()
        Dim ParamVal2 = New CrystalDecisions.Shared.ParameterDiscreteValue()

        param2.parameterFieldname = "FromDate"
        ParamVal2.Value = strFromDate
        param2.CurrentValues.Add(ParamVal2)
        paramFields.Add(param2)

        Dim param3 = New CrystalDecisions.Shared.ParameterField()
        Dim ParamVal3 = New CrystalDecisions.Shared.ParameterDiscreteValue()

        param3.parameterFieldname = "ThruDate"
        ParamVal3.Value = strThruDate
        param3.CurrentValues.Add(ParamVal3)
        paramFields.Add(param3)

        Crystal.ParameterFieldInfo = paramFields

        Crystal.ReportSource = rpt
        Crystal.RefreshReport()
        rpt.PrintOptions.PrinterName = "\\isaap\brother"
        rpt.PrintToPrinter(1, False, 1, 1)


The report is a simple report (to test the crystal viewer so far) that displays the three parameters on the page. My problem is that when I print the report, the parameters do not print. If I add a label to the report, I can see the label, but not the boxes with the parameters. Any ideas what's going on here?

Also, I would like this report to print to the default printer on the pc that is accessing it, so everyone is not printing to my printer. I've read that you can not specify the printername and it will print to the default, but when I do that, it does not print (or error) at all. Any ideas what is going on with that?

Thanks,
Dave
 
Old June 1st, 2005, 05:01 AM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there..
Me too in same prob.. guess u must have figured a way to print on the default printer of the accessing pc..

Can u let me know how u went about with it??

thanks in advance

 
Old August 2nd, 2005, 11:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Dear Dave as I got u have problem passing Parameter to CR form & printing issue.
I dont know what is ur DataSource but in most cases u should login to ur DataSource! if u give me more info I might help u more.


Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
Printer [email protected] Pro VB.NET 2002/2003 0 December 27th, 2005 02:01 AM
Printer issues jbinnig BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 January 31st, 2005 12:39 PM
Printer.Printer Problem!! Pls Help Me Chamin Access VBA 0 December 10th, 2004 07:08 AM
Printer Settings melvik C# 0 May 25th, 2004 02:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.