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
  #1 (permalink)  
Old February 1st, 2005, 03:06 PM
Registered User
 
Join Date: Jan 2005
Location: Port of Spain, , Trinidad and Tobago.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default CR10 and C# .NET

hi I'm having a small problem, i hope someone here can help me.

I have a Report done in crystal reports 10. This reports calls a stored procedure, gives it 3 parameters and outputs the result and the 3 parameters on the report. this is working fine.

i have this code in c# to create the report convert it to pdf format and put it on my web page.

MemoryStream oStream;
Reports.StatByUser report1 = new MSPOS.Reports.StatByUser();
report1.SetDatabaseLogon("username", "password");
report1.SetParameterValue(report1.Parameter_STARTD ATE.ParameterFieldName.ToString(), "ccmanager");
report1.SetParameterValue(report1.Parameter_STARTD ATE.ParameterFieldName.ToString(), "2004-01-01 00:00:00");
report1.SetParameterValue(report1.Parameter_ENDDAT E.ParameterFieldName.ToString(), "2004-01-31 23:59:59");
report1.SetDataSource(GetUserSalesDS());
oStream = (MemoryStream)report1.ExportToStream(CrystalDecisi ons.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();

when i call this code the pdf file is created and i have the result of my stored procedure in it, but the parameters do not appear. if i erase the line "report1.SetDataSource(GetUserSalesDS());", the i see the parameter fields in the pdf file but i dont see the result of the stored procedure.

can n e one tell me what im doing wrong??

thanks,

Mike.
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
Help!!! Bar Chart color in CR10 amoddesh Crystal Reports 2 May 12th, 2009 03:44 AM
CR10 + Thai characters hutchbrew Crystal Reports 0 February 13th, 2006 01:56 PM
JSP passing parameter to CR10 ray5 Crystal Reports 0 September 2nd, 2005 01:27 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM
CR10 newbie questions drunken Crystal Reports 0 January 19th, 2005 03:14 PM



All times are GMT -4. The time now is 09:26 PM.


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