Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Parameters in ASP.NET Post Reply Post New Topic
Author Message
SunDevilPrgmr
Newbie
Newbie


Joined: 20 Nov 2007
Location: United States
Online Status: Offline
Posts: 6
Quote SunDevilPrgmr Replybullet Topic: Parameters in ASP.NET
    Posted: 22 Nov 2007 at 11:41am
I have don everything necessary (or so it seems) to parametrize my report:
1.  The report is a stand-alone report which extracts data from an Oracle stored procedure that has an input paramater.
2.  In the report I again created a parameter option for the filter.. After I found no success getting the viewer to allow m eto filter the data, I ..
3.  Created a formula in Select Expert to filter based on the parameter name (from previous step).
 
No success...
 
I later called thisreport from ASP.NET.  Same result... unable to select the parameter. 
 
Basically, I want to be able to select the records based on CustomerID selected.  The report works like the CustomerID is hard coded. 
 
I am currentlyusing "Preview Report" to view the report.  Do I have to use something else to be able to run the report or the page the way a user would run it?
 
Thanks,
 
SunDevilPrgmr


Edited by SunDevilPrgmr - 01 Dec 2007 at 8:23pm
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 22 Nov 2007 at 2:32pm
Don't know what your problem is because is sounds like you are doing things correctly. If you have an Oracle stored procedure with a parameter, is the report prompting you for the parameter prior to printing the report? If so, can you use an Oracle tool to make sure that the paramter is getting passed corectly to Oracle? (MS SQL Server has a database monitoring tool that lets you do this and I would think that Oracle has a similar program).

As far as the parameter for the report goes, I have about the same questions. If you are using it in the record selection filter then you should be prompted for the parameter prior to printing the report. If not, then the selection filter isn't using the parameter and thus won't filter the data. It's also possible that the selection filter isn't coded properly.

A problem I've run into is when the selection formula is testing data that has null values. Make sure you set the report option to use default values for Nulls. That can prevent some headaches as well.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
SunDevilPrgmr
Newbie
Newbie


Joined: 20 Nov 2007
Location: United States
Online Status: Offline
Posts: 6
Quote SunDevilPrgmr Replybullet Posted: 29 Nov 2007 at 8:52am
Thanks for getting back.  I now have a new issue.  Again, going back to your book, I tried to follow the instructions (Page 328, Listing 16-2).
 
In trying to programmatically include parameters, I could not use the "ParameterFieldDefinition" inspite of declaring it earlier as has been shown.  Is it an ASP.NET 2005 issue or is it something else?
 
Thanks
 
SunDevil
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Nov 2007 at 1:19pm
.NET 2005 added new methods to the parameter classes to make them easier to use. In my book I show all the .NET 2003 code for creating new objects and adding them to the parameter collection. Now you can just call an add method and all the work is done behind the scenes. Much easier now than typing in all the code that .NET 2003 needs.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
SunDevilPrgmr
Newbie
Newbie


Joined: 20 Nov 2007
Location: United States
Online Status: Offline
Posts: 6
Quote SunDevilPrgmr Replybullet Posted: 01 Dec 2007 at 8:22pm
Thanks!  Any plans to bring out one for VS2005?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 02 Dec 2007 at 12:00pm
Unfortunately, I'm way behind schedule on the VS 2005 book. My current book sales have been really bad and I've had to divert my attention to better marketing. I literally get tens of thousands of people using this website, but only a couple people will buy a book. I just don't get it. The stats are shockingly disappointing. So I had to redirect my attention from writing new content to doing marketing of the book. In fact, when you read this post the website might look completely different b/c I've been working like crazy to rebuild it. I hope that a new design will make it easier for people to learn about my books and hopefully buy a copy. My next step is to take all my books and convert them to a blog format that is subscription based. Then I'll add my VS 2005 chapters as I write them so members can read and comment on them as the book is being written. That will make it a community driven book where the members get to decide what is in the book. It also gives you access to the material as I write it rather than waiting for the whole book to be finished. I don't think this has ever been done before and I really hope that it is successful. The bad drawback is that all this is taking away time from doing what I should be doing: researching and writing new Crystal Reports content. But I can't run this site this for free and I have to figure out a way to get some of the thousands of people who use this website to actually spend a few dollars on a book. Makes me frustrated to think how much time I waste doing non-content related work when I could be using my time really helping people learn new things about CR. 
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jovball
Newbie
Newbie


Joined: 10 Dec 2007
Location: United States
Online Status: Offline
Posts: 3
Quote jovball Replybullet Posted: 11 Dec 2007 at 8:46am
Brian:

I think this is a good idea as long as your subscription cost is low. I am willing to pay for good information.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 11 Dec 2007 at 11:49am
I'm thinking $19.95 for a one year subscription. This gives you access to all my books online. What do you think?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.030 seconds.