473,396 Members | 2,029 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.

Export Report in Visual Studio 2005 don't show stored procedure parameters

I am exporting reports in pdf format from .net 2005 . The export is working fine; however the user values of stored procedure parameters does not show in the report. What do I need to do in order to see the parameters value in the report?

The report has a report parameter "reportTitle" and i see the value in the report.
It has also another 2 stored procedure parameters @BeginDate and @EndDate.
The values are entered be the user; however in the report those values don't appear.

I used the following code:
//load the report
crReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocum ent();
crReportDocument.Load(Server.MapPath("\Reports\Pro duction.rpt") ;
// set logins for the crystal report
Hashtable reportParamsHash = ((Hashtable)Session["ReportParamsHash"]);
foreach (String keyParamName in reportParamsHash.Keys)
Utilities.SetParam(crReportDocument, keyParamName, reportParamsHash[keyParamName].ToString());
// export report
Utilities.ExportToPDF(crReportDocument, Server.MapPath(fileName));

// function that sets report parameters values
public static void SetParam( ReportDocument crReportDocument, string ParamName, object ParamValue)
//set the parameter value
crReportDocument.SetParameterValue(ParamName, ParamValue);
// function to export the report
public static void ExportToPDF(ReportDocument Report, string file)
{ ExportToDisk(Report, file, ExportFormatType.PortableDocFormat);
private static void ExportToDisk(ReportDocument Report, string fileName,ExportFormatType expFormat)
DiskFileDestinationOptions diskOpts = ExportOptions.CreateDiskFileDestinationOptions();

ExportOptions exportOpts = new ExportOptions();
exportOpts.ExportFormatType = expFormat;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile ;

diskOpts.DiskFileName = fileName;
exportOpts.ExportDestinationOptions = diskOpts;



Can anybody help?
Thank you,
Oct 20 '06 #1
0 2133

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
by: GC | last post by:
HI, I'am using Crystal Report with visual Studio .NEt 2003 When i make a report using a store procedure, I can not see all the fields of the store proc and i'm suppose to see those fields. I'm...
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
by: Mark Flippin | last post by:
This is for a reporting problem using: Access 2000 SQL Server 2000 Both at SP3 I've a stored procedure in SQL Server 2000 which builds a result set from a disparate set of tables, utilizing...
by: Vadim Vulfov | last post by:
My task was to create Crystal Report on ASP.NET page to display different date depending on to textboxes From Date and To Date. I created stored procedure in SQL with two parameters from_date and...
by: Bill Nguyen | last post by:
What's the VB syntax to run the CR report using the following SP? I use CrystalreportViewer and ReportDocument. Thanks Bill Here's the SP in SQLserver 2K: CREATE proc mysp_ReportSubmission...
by: Andy | last post by:
Hi guys I having a problem creating a report in Access 2003 project talking to a SQL database through and ODBC connect. After hours of trying things from Access Help, MSDN and Google I still...
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
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,...
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...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.