Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
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 January 29th, 2004, 12:01 AM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filtering Report with Session Variable

I'm unexperienced at using Crystal reports and I'm already stuck. I know how to put a report on my asp.net page and pull in straight data from my sql server, but I need to filter that data by using a session variable. Can someone help me here? I'm totally lost. I'm pulling these columns and need to filter with OwnerID.

OwnerID
FirstName
LastName
Phone

Thanks,
DW
 
Old February 6th, 2004, 11:12 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there are two ways you could aceive this.

Firstly create the report with a parameter and then use the reportdocument class to get into the paraeters collection and populate this (which is not a simple as it sounds)

For one field this may be over kill.

I would personally look at the selection forumla within crystal and set the owner id as an example, copy this string and place it within your code.

Use the reportdocument class to get the selectionformula string, you can then replace this string with a custom built one based on your field and the session variable value.

HTH






Similar Threads
Thread Thread Starter Forum Replies Last Post
session and variable... badboy1 ASP.NET 3.5 Basics 1 August 3rd, 2008 09:14 AM
pass session variable to report select where nutrino ASP.NET 2.0 Basics 0 October 25th, 2006 09:16 AM
Session variable anuradha80 General .NET 3 November 4th, 2004 12:39 AM
Session variable mrideout BOOK: Beginning ASP.NET 1.0 1 August 12th, 2004 07:01 PM
Session Variable mcdowell BOOK: Beginning ASP 3.0 5 June 20th, 2004 05:47 AM





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