Total apprentice at Crystal Reports - linking Parameters (1 Viewer)

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
Hi guys,

Ok so go steady on me, I've just got myself a copy of Crystal Report 2008 and Im trying to build some reports. Ive managed to create a standard report which pulls the data in from the necessary tables and it works fine.

What Im trying to do now is create a linked report, so a user is prompted to select a name from the drop down list and the other fields linked to that report pull through - suffice to say its not working.

The name selected is populated on the report but the address details linked aren't showing through. Ive created formula fields, added the fields from the tables and then set select expert record and linked it to the drop down prompt but neither works.

Could anyone tell me what Im doing wrong or the correct process please?

Thanks :)
 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
When you say linked report. Are you talking about a sub-report?

I am not quite following what you are trying to accomplish. So you have a prompt for the main report and you want to pass that information to the sub-report? Generally you link the prompt from the main report to a field in the sub-report (a prompt and select statement will be created in the sub-report). I hope this helps.
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
When you say linked report. Are you talking about a sub-report?

I am not quite following what you are trying to accomplish. So you have a prompt for the main report and you want to pass that information to the sub-report? Generally you link the prompt from the main report to a field in the sub-report (a prompt and select statement will be created in the sub-report). I hope this helps.

Hi Kevlray,

Apologies Im probably not making sense due to the terminology used.

Ive created a parameter which prompts the user to select a company name from one table. From that very same table I would then like to link the company's address which is made up of 5 fields and also link a contact name from another table which is joined to this table.

All tables are joined by a "customer" field.

Also Im guessing the fact a report contains fields from other tables doesn't class that section as a "sub report"? Its still a standard report isn't it?

Thanks
 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
It still a standard report. It appears you just have to get the linking right between the Company table and the Contact table. Then it should just be a matter of dropping the fields on to the report and providing any parameters to filter the report. I believe there are some tutorials and you tube videos that explain the basics of using Crystal Reports. When I started using CR, I did not understand linking and pretty much brought down the server I was reporting off of due to what is called a cartesian product or a many to many link
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
It still a standard report. It appears you just have to get the linking right between the Company table and the Contact table. Then it should just be a matter of dropping the fields on to the report and providing any parameters to filter the report. I believe there are some tutorials and you tube videos that explain the basics of using Crystal Reports. When I started using CR, I did not understand linking and pretty much brought down the server I was reporting off of due to what is called a cartesian product or a many to many link

Thanks, I think my links are correct.

When you say dropping the fields on the report, are the fields your referring to Formula fields? If so (and this is how Ive done it but its not working) I create the formula fields such as Address2, within the Formula Workshop I drill down on the ODBC database find the filed on the table and add it. It gets added as {Address.Line1} to which I then drop onto the report which shows as @Address2.

Thanks
 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
Not necessarily, within the field explorer you should see all the fields available for you from the database. You also can create formulas (as you have done), running totals, etc. I am not sure why you are not seeing the value once you refresh the report.
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
Not necessarily, within the field explorer you should see all the fields available for you from the database. You also can create formulas (as you have done), running totals, etc. I am not sure why you are not seeing the value once you refresh the report.

Hi,

Ive taken a snap of the field explorer, looking at another example of a report the parameter field has the database behind it but the one Im currently working with doesn't - is this right?

 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
Looks pretty good. Click on the plus sign next to Database Fields and click on the plus sign next database name and you should see all the fields that be placed on the report.

The parameter is in the report, but unless it is part of the selection criteria (look for the hand with two circles under it on the toolbar), it will not filter any results.
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
I cant see any hands with circles on the toolbar - as below




The parameter initiates the selection criteria as from it you select the name of the company to which (this is the bit that doesn't work) the address for that company should show up on the report as below

(although it shows dots there are the names of the company's if I click the drop down)

 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
You have Crystal 2011, not 2008. Look for the yellow funnel.

I do not know how you set up the parameter (there are lots of options). But once you open Select Expert, you can choose a field to filter on. Then (if set up properly) you can select the parameter to use for the filter.
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
You have Crystal 2011, not 2008. Look for the yellow funnel.

I do not know how you set up the parameter (there are lots of options). But once you open Select Expert, you can choose a field to filter on. Then (if set up properly) you can select the parameter to use for the filter.


Hi,

Got there in the end I was doing it completely wrong. I wasn't using the filters to produce the results - Ive since changed it and its working.

Thanks for you help :)
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
Ok so Im starting to get a little cocky with this... After messing with the filters etc. I notice if I specify within a filter certain criteria such as if a company is active then when I select a company from the table if it IS ACTIVE it populates the record. If its INACTIVE it returns nothing - great.

But what I would like to do is use this criteria on a Parameter field. So my dynamic lookup would lookup Company Name which IS ACTIVE - is this possible and if so how?

Thanks
 

kevlray

Registered User.
Local time
Today, 04:45
Joined
Apr 5, 2010
Messages
1,046
Not sure (I am better at seeing the problem). So do you just want to see the ACTIVE records? Or you want to select ACTIVE and INACTIVE and be able to choose the companies? Or something entirely different. There is a thing known as cascading prompts, pretty to set up. There is a limitation of 1000 entries in the prompt unless you modify the registry.
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
You have Crystal 2011, not 2008. Look for the yellow funnel.

Any reason why the splash screen which launches into Crystal Reports says 2008 and if I go into the help about it says Crystal Reports 2008 Version 12? And as said Im a total newbie to this so please don't think I am insulting you :)

Cheers
 

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
Not sure (I am better at seeing the problem). So do you just want to see the ACTIVE records? Or you want to select ACTIVE and INACTIVE and be able to choose the companies? Or something entirely different. There is a thing known as cascading prompts, pretty to set up. There is a limitation of 1000 entries in the prompt unless you modify the registry.

I managed to get the active records to display :) also managed to setup cascading prompts :) but then my luck changed. I was testing out my report making sure it works - and it does to a point.

There are 2 tables - Image Link http://img833.imageshack.us/img833/3369/s2xm.jpg

If I don't have the Contact_Name from the Contact table in the report it works fine. If I do, it removes all the other returned values in the report. I think (after doing some googleing) this is down to the joins, but the joins where automatically created.

Am I not thinking correctly, that based on the filter if I select Company A then all the values in both tables should be returned in which I have added to the report?

Thanks
 
Last edited:

shabbaranks

Registered User.
Local time
Today, 11:45
Joined
Oct 17, 2011
Messages
300
All working, brought it home set it up on my PC and it works... Very strange :confused:
 

Users who are viewing this thread

Top Bottom