Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Tag Based FormParameter question Post Reply Post New Topic
Author Message
rtcwls
Newbie
Newbie
Avatar

Joined: 24 May 2007
Location: United States
Online Status: Offline
Posts: 1
Quote rtcwls Replybullet Topic: Tag Based FormParameter question
    Posted: 24 May 2007 at 4:54pm

Hello,

Here is short intro before my question:

I am building a report that I want to show in a new window without any website headers or footers. That way, when someone views the report they will see "only" the report with the crystal toolbar.

In order to do this I am collecting parameter data on a different page with a button that will launch the report in a new window (target='_blank')

In the documentation/samples is says:

"When you develop with a reduced-code model (the tag-based application model), the CrystalReportSource control accesses and interacts with parameters through use of the Parameters framework. The Parameters framework is new to ASP.NET version 2.0. It allows parameters to be assigned to any DataSource control (in this case, a CrystalReportSource control.) These parameters can be assigned to both the main report and any subreport, should they require parameters.

A parameter is assigned from any of the following parameter types:

* ControlParameter
* QueryStringParameter
* SessionParameter
* FormParameter
* CookieParameter

This parameter assignment enables you to create a reduced-code solution, where a report's parameters can be set from selections made in DropDownList controls (or other types of controls), values in the URL query string, values retrieved from Session, posted values from form fields, or values from a Cookie."

Looking in the code for my webpage with the reportSource on it I have the folowing test parameters:

<Parameters>
<CR:ControlParameter ControlID="TextBox1" ConvertEmptyStringToNull="False" DefaultValue=""
Name="StartNumber" PropertyName="Text" ReportName="" />
<CR:ControlParameter ControlID="TextBox1" ConvertEmptyStringToNull="False" DefaultValue=""
Name="EndNumber" PropertyName="Text" ReportName="" />
<CR:Parameter ConvertEmptyStringToNull="False" DefaultValue="Test" Name="newParameter1"
ReportName="" />
</Parameters>

Here is my Question:

How do I assign Form Field Values to a parameter?

When I start typing in a new xml tag I get intellisense that only gives me the two options above, a plain parameter or a controlParameter. I am expecting to create something like this:

<CR:FormParameter FormID="aspnetForm" ConvertEmptyStringToNull="False" DefaultValue=""
Name="FormParameter" PropertyName="SomeTextBoxName" ReportName="" />
 
I can not find any examples of how to set the parameter from a Form value or a QueryString value even though the documentation says it is possible.

Thank you,

Art

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.031 seconds.