Passing Parameters to a Crystal Report and data from more tables

  • Thread starter Thread starter Maria
  • Start date Start date
M

Maria

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 ).
 
Back
Top