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 February 1st, 2005, 03:06 PM
Registered User
 
Join Date: Jan 2005
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.





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





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