473,405 Members | 2,167 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,405 software developers and data experts.

Passing Parameters to a Crystal Report and data from more tables

Hello!

I am new to Crystal reports an I have problems passing parameters form
outside to Crystal report an creating a report with data from more
than one table

This is the problem:
I have to make a report( VS.NET, C#, Web Form) with 3 parts and with
data from three tables:
1st part: all the field values form table1 coresponding to an Id (Id
is prymary key and I want to get only one row);
2nd part: multiple rows from table2 coresponding to the same Id
3th part: multiple rows from table3 coresponding to the Id
In table2 and table3 Id is foreign key
I want to pass this Id form a list/textbox on the Web form as a
parameter to my report.
I created a parameter for the report called MF_Id with default value
1001 -the value exist in table1. I
f I set the Id field to be equal to 1001 it works, but when I set it
to be equal to {?MF_Id} it dosen't work. (form Select Expert)
It dosen't work when I write
report3.Parameter_MF_Id.CurrentValues.Clear()
report.Parameter_MF_Id.CurrentValues.Add(1001)
neither.(value 1001 will be replaced with a variable later- but I
want it to work like this for now)

Could you tell me how can I fix this?

Alsow I what suggestion about how to dial with the three parts of the
report:
a record with three subrecords - each one passing the parameter Id or
a command with union of select statemens. Selecting all the tables and
all the fields with the condition that Id=1001 well the row from
table1 and the rows from table2, but the rows from table3 are not
unique (repeat the seame row ).
Nov 16 '05 #1
1 3595
you need to have everything embedded in your sql statement
itself.

You could further follow
http://www.crystalreportsbook.com/FreeEbook.asp that has
an electronic book on .NET with crystal reports.

HTH
irfan
Nov 16 '05 #2

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

Similar topics

0
by: Aaron | last post by:
The following code works fine when previewing a Crystal report using ASP, EXCEPT when it gets to a report using a SubReport and its associated parameters. The whole report just comes up blank with...
2
by: Tim Burda | last post by:
I posted this in another forum, but I'm adding it here to for more exposure.I am using Visual Studio 2003 and trying to get Crystal Reports to produce output. If you have any ideas, please let me...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
3
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
0
by: Craig Faulkner | last post by:
I have been fighting through my first crystal report in VS2003.NET and have made some headway. Here is what I've done: 1. Created a crystal report in VS2003 from a SQL stored procedure with...
0
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource...
1
by: raf_z | last post by:
Hi, I'm running a website with Asp.NET, and on one of the pages i have a crystal report with 3 user-populated parameters. However, not all params might be selected. Example: Parameters: 1....
10
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, Obtaining Data Based Upon Multiple Selections From a ListBox... I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual...
3
by: FeveZ | last post by:
I've been stuck on a problem now for ages and i'm about ready to pack my project in because of it lol. OK here is my scenario. I have an existing Crystal Report, which I have added to my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.