By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,679 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Passing Parameters to a Crystal Report and data from more tables

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.