| Author |
Message |
karenros
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 14
|

Topic: Can we specify a filter in crystal reports? Posted: 28 Jul 2008 at 7:05am |
I have a sproc which returns some rows of ID's and if those rows are Funds they also return a F and if there are a portfolio they return a P..
So is there way i can filter them in my report.. Like using a text box or any other object..
any help will be appreciated.
thanks
Karen
|
IP Logged |
|
|
|
vallance
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 12
|

Posted: 28 Jul 2008 at 6:13pm |
Yes, there are several ways from what I understand. For one, lookup the "Mid" function in your manual. You specify the formula to return a give only a piece of the string when you use that.
So if your field looks like this:
ID#: 30303030 P
It looks like this:
Mid(IDFIELD, 1, 8)
the 2nd number tells it where to start the extraction
the 3rd number tells you how many characters to extract.
You may also want to lookup some other functions like "Length" or "Trim"
|
IP Logged |
|
karenros
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 14
|

Posted: 29 Jul 2008 at 7:09am |
Sorry if i confused you... But the ID and the P Or F are in different columns.. the result set will be as follows
PlanId FundId FundName DisplayOrder InvestmentId
898 45 abd 1 F
898 52 ddkdk 2 F
898 4612 Mod Portf 1 P
|
IP Logged |
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 30 Jul 2008 at 4:46am |
|
First create a parameter
And then under Report\Selection Formula\Record add a formula to select those records which match your criteria.
It should look something like
{table.InvestmentId}={?Parameter}
|
IP Logged |
|
karenros
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 14
|

Posted: 30 Jul 2008 at 6:26am |
Originally posted by saoco77
First create a parameter
And then under Report\Selection Formula\Record add a formula to select those records which match your criteria.
It should look something like
{table.InvestmentId}={?Parameter}
Thanks Saco,
Do i create a internal parameter and can u please give me some steps as to how to do it..
Thanks
Karen
|
IP Logged |
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 30 Jul 2008 at 7:27am |
|
Under the Field Explorer
Right click on Parameter Fields and select "New"
I'm assuming that the parameter type will be "string". Note: Keeping the default entries on this window will require users to type in F or P or if needed you could create a dynamic or static pick list.
Next Then under the report pull down menu choose "selection formulas" and enter something similar to what I previously typed - it may vary depending on data structure.
Everytime the report is refreshed it will generate a prompt to enter the Investment ID and will select only those records which match.
Sarah
|
IP Logged |
|
karenros
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 14
|

Posted: 30 Jul 2008 at 7:40am |
Originally posted by saoco77
Under the Field Explorer
Right click on Parameter Fields and select "New"
I'm assuming that the parameter type will be "string". Note: Keeping the default entries on this window will require users to type in F or P or if needed you could create a dynamic or static pick list.
Next Then under the report pull down menu choose "selection formulas" and enter something similar to what I previously typed - it may vary depending on data structure.
Everytime the report is refreshed it will generate a prompt to enter the Investment ID and will select only those records which match.
Sarah
Sarah,
Thanks for the answer..
Actually there will be someparts of the reports where i would only wanna show InvestmentIDs that have a P and may be below that section i would want to display investmentID's that are F and there no user interaction..
Is there away i can do any dataset manipulation in a stand alone crystal report like for eg..
If the same sproc returns around 12 rows then i would want to show 6 on one side and the other 6 next to it.. like u read a news paper it should be from Top to Bottom and then to the right??
Is there any ways i can acheive that way of displaying the records..
Thanks
Karen
|
IP Logged |
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 30 Jul 2008 at 8:00am |
|
I'm still unclear as to the format you are looking for an example of what the output should look like might help. Ideas
1) Grouping on Investment ID could allow you to break out by P and F
2) Creating subreports and placing them on the master report could allow you to position information.
In the subreport recreate the record selection formula filter the data to to return a subset.
Example {table.InvestmentId}="F"
3) Format with multiple columns
In the section expert you can set the details section so it will print as multiple columns.
Sarah
|
IP Logged |
|
karenros
Newbie
Joined: 28 Jul 2008
Location: United States
Online Status: Offline
Posts: 14
|

Posted: 30 Jul 2008 at 8:13am |
Originally posted by saoco77
I'm still unclear as to the format you are looking for an example of what the output should look like might help. Ideas
1) Grouping on Investment ID could allow you to break out by P and F
2) Creating subreports and placing them on the master report could allow you to position information.
In the subreport recreate the record selection formula filter the data to to return a subset.
Example {table.InvestmentId}="F"
3) Format with multiple columns
In the section expert you can set the details section so it will print as multiple columns.
Sarah
My final Output will look like.. If there 11 InvestmentId and i want to show all off them in my report then are should like this
1name 7name
2name 8name
3name 9name
4name 10name
5name 11name
6name
I want my final output to be displayed in the above way if the no. of records are even then it will be distributed evenly
Thanks
Karen
|
IP Logged |
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 31 Jul 2008 at 12:16pm |
|
I'm not certain of how to accomplish this.
My best guess would be to experiment with "Format with Multiple Columns".
This is available as a checkbox item for the details section under the section experiment.
Sarah
|
IP Logged |
|
|
|