473,698 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass Session Variable Value to Crystal Report?

I've got an aspx page that allows the user to select different options
whenever they want to run a report. On this page, I have added an
additional text box for the user to enter in comments about the report
they are running.

I would like to be able to have the comments that the user has entered
to appear on the report that is generated. I thought that I might be
able to pass this text to the report by using a session variable but I
have had no luck. It doesn't matter if I use a session variable to
accomplish this.

Can someone tell me how I can the user's comments from the web form
appear on the report?

Thanks!
Nov 17 '05 #1
1 4623
I figured out a way to accomplish this. I created a session variable
named UComments and stored the text that the user typed in it. On my
Crystal Report I created a blank formula field named UserComments I
next added the following code to my web form:

Dim oRpt As CrystalDecision s.CrystalReport s.Engine.Report Document
= New CrystalDecision s.CrystalReport s.Engine.Report Document()

'*** TELLING THE PROGRAM WHER THE REPORT IS LOCATED
'*** AND WHAT THE REPORT'S NAME IS. ***
oRpt.Load(Sessi on("ReportLocat ion") & "Grant.rpt" )

'*** CODE TO WRITE USER'S COMMENTS TO THE REPORT. ***
oRpt.DataDefini tion.FormulaFie lds.Item("UserC omments").Text = "'"
+ Trim(Session("U Comments")) + "'"

CrystalReportVi ewer1.ReportSou rce = oRpt
cr****@earthlin k.net (crjunk) wrote in message news:<e4******* *************** ****@posting.go ogle.com>...
I've got an aspx page that allows the user to select different options
whenever they want to run a report. On this page, I have added an
additional text box for the user to enter in comments about the report
they are running.

I would like to be able to have the comments that the user has entered
to appear on the report that is generated. I thought that I might be
able to pass this text to the report by using a session variable but I
have had no luck. It doesn't matter if I use a session variable to
accomplish this.

Can someone tell me how I can the user's comments from the web form
appear on the report?

Thanks!

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9631
by: Wayne Baswell | last post by:
I want to pass a date variable to a sql statement from Crystal Reports. The part of the query accepting the variables looks like: "Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and To_Date('30-JUN-03','mm/dd/yy')" And I'd be wanting to replace the date part of the query with a user-entered date. As I'm new to Oracle and Crystal, I don't know where to start. Is there a way to replace the '1-JUN-03' part with a variable in...
0
1831
by: Michael | last post by:
I followed the solution document at the http://support.businessobjects.com/library/kbase/articles/c2015079.asp?ref=devzone_netzone_howto .. However, the Crystal Report prompt is still showing. The following are my scenario, the platform, and partial code information. Thanks in advance for the help, Michael J. ------------------------ 1. Scenario: I am trying to pass the parameter value to an embedded Crystal Report file from C#.NET...
4
2146
by: JIsenstadt | last post by:
I would appreciate it if anybody can help with a issue I am having in an ASP.NET application that is timing out before a process has been completed. The scenario ASP.NET application under IIS 5 runs a crystal report (which has a lot of complex formatting) and returns over 6,000 pages. The time to export this report to PDF using Crystal Reports Directly on the server is 83 minutes. But when the export to PDF is done through the Web...
4
11792
by: javatopia | last post by:
Hello, I am trying to show a Crystal Reports 10 Enterprise report in an ASP.NET page (C#). I can run the report via the admin console just fine. When I try to show the report, after setting up its parameters, I get: "Value does not fall within the expected range." How are people interacting with the Crystal Report viewer to set the parameters on a report? I haven't found any useful documentation at
4
2249
by: Marcelo | last post by:
Any suggestion? Thanks Marcelo
17
7070
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the returned value is "" Anybody know how to set this value on 1st page properly, in order to let 2nd page catch it? I don't want to use querystring to pass this value!
0
1716
by: Linda W. | last post by:
Hi, I would appreciate any insight into the following issue.. I have an asp.net application with crystal reports being displayed.. All works fine from my IDE & I am trying to move the app to a test server. The report parameters are input on the first aspx page and I store them in the Session object & use a Server.Transfer() to get to the page that displays the crystal report. The report parameters are all successfully passed to...
1
1447
by: Shailja | last post by:
Hi, I am using VB. I need to pass a variable, called varQTY from VB to crystal report.What code do i need to write in VB and as well as in Crystal Report. Kindly let me know.
3
4761
by: hon123456 | last post by:
Dear all, I have a session variable session("loginid) which can be passed from A.asp to B.asp. Then In B.asp I have a hyperlink to C.asp e.g. < A href..C.asp>. The session variable cannot be passed to C.asp. The session variable is empty. What can I do to debug this problem? Thanks
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8901
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.