Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old July 28th, 2003, 01:49 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:D
all code is C#...
Hic...
No VB???
Do you help me???


Reply With Quote
  #12 (permalink)  
Old July 30th, 2003, 11:15 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Erorrs
Help Me???

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Error in File D:\Inetpub\wwwroot\nguyen_rp\suco.rpt: Unable to connect: incorrect log on parameters.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[LogOnException: Error in File D:\Inetpub\wwwroot\nguyen_rp\suco.rpt:
Unable to connect: incorrect log on parameters.]
   .I(String , EngineExceptionErrorID ) +506
   .D(Int16 , Int32  ) +617
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext) +586
   CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext) +152
   CrystalDecisions.Web.ReportAgent.{(Boolean E) +214
   CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e) +143
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1470





Reply With Quote
  #13 (permalink)  
Old October 15th, 2003, 08:06 AM
Registered User
 
Join Date: Oct 2003
Location: Edison, NJ, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have a look at this link:
http://support.crystaldecisions.com/...s/c2013364.asp

HTH
Akhtar

Reply With Quote
  #14 (permalink)  
Old October 22nd, 2003, 03:23 PM
Registered User
 
Join Date: Oct 2003
Location: Montreal, Quebec, Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Melvik,

Thanks for the tips from 26-Jul-2003. For several days now I have been looking for how to pass Crystal runtime parameters based on web controls. I was able to apply your C# example to VB.NET and successfully use the param in my report. Here are the steps I followed:

I created a Crystal Report using any old data source. Then I created a string parameter called MyParameter. After that I created a new WebForm with a textbox, button and CrystalReportViewer controls. Run the form, enter something in the textbox, click the button, and voilà!

Here's the code for the onclick event of the button (in VB.NET):

        Dim crParamField As New ParameterField

        Dim crParamFields As New ParameterFields

        Dim crParamValue As ParameterValue

        Dim crParamValues As New ParameterValues

        Dim crReport As New CrystalReport1

        Dim crParamDiscreteValue As New ParameterDiscreteValue

        CrystalReportViewer1.ReportSource = crReport

        crParamFields = CrystalReportViewer1.ParameterFieldInfo

        crParamField = crParamFields("MyParameter")

        crParamValues = crParamField.CurrentValues

        crParamDiscreteValue.Value = Me.TextBox1.Text

        crParamValues.Add(crParamDiscreteValue)

I also tried hard-coding the databinding of the report source in the webform and that worked too, except then you'd need to remove Dim crReport As New CrystalReport1 and CrystalReportViewer1.ReportSource = crReport and use CrystalReportViewer1.DataBind() on the first line after the Dim statements.

I'm new to CR, and let me tell you, I found this whole exercise frustrating to no end. Sure, CR is very powerful, but this is needlessly complicated. Eleven lines of code to pass-in a parameter seems excessive. And there are no resources online (believe me, I searched and searched and read and read) that explain how to do this.

IMHO, CR gets off easy by being included in VS2003. MS should consider pushing CrystalDecisions to revamp their product. It shouldn't be this complicated to do basic stuff. For example, try making a report using a Wizard. Name the report something. Then try to rename the report. I gave up trying to find where this value is stored. It should be much less of a headache for developers to use this otherwise fine product.

I'd appreciate any comments you might have: david.pyper@muhc.mcgill.ca.
Reply With Quote
  #15 (permalink)  
Old November 3rd, 2003, 11:22 AM
Registered User
 
Join Date: Nov 2003
Location: Espoo, -, Finland.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just had to log in to this forum to thank you David, what a great post!! This was the information Ive been searching all over the net.



Cheers,
Leo Merikallio
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to view crystal report in asp.net bhaveshsanghani BOOK: Professional Crystal Reports for VS.NET 1 October 26th, 2014 12:10 AM
ASP.Net, Access DB, and a webform? TheNinthPlayer BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 June 3rd, 2008 10:28 AM
Embed MsWord in asp.net webform rajatake ASP.NET 2.0 Professional 1 December 5th, 2006 11:29 AM



All times are GMT -4. The time now is 10:18 AM.


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