Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Need help with requirements Post Reply Post New Topic
Author Message
MrNorth
Newbie
Newbie


Joined: 10 Jan 2007
Location: Sweden
Online Status: Offline
Posts: 1
Quote MrNorth Replybullet Topic: Need help with requirements
    Posted: 10 Jan 2007 at 12:16pm
Hi!
 
My client want me to design a report for a winforms .net 2005 application. The requirements are as follows, the reports should be able to:
 
1 Display a picture from database
 
2 have 4 parameters determined at runtime
 
3 to show a table of data by where the columns are determined at runtime. The data is returned from a webservice as a ado.net dataset. At designtime the number of columns are unknown.
 
 
4 have the ability to evaluate each row of the table generated at 3, and if a certain column has a certain data, then the entire lines text should be of style "linethrough" and have red text.
 
I have very limited knowledge of the Crystal Reports for .NET 2005 so before I start digging into this, I want to ask you pros if all these 4 requirements are possible to achieve using the .net component?
 
kind regards
Henrik
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 15 Jan 2007 at 12:57pm
Item 1
Absolutely can be done.  You should be able to just drag the field onto your report.
 
Item 2
You can set up the 4 parameters to the report and send the values in your code.
 
Item 3
A totally variable number of columns is not do-able.  There are ways around this, but you'll have to know the absolute MAX number of possible columns that can be on the report.  You then set up the dataset with that many columns.  Also, one of the issues you may run into if they select too many columns is the amount of "real estate" available on the report for displaying all of the columns.
 
Also, in order to design the report, your ado.net dataset will have to have a pre-specified set of columns so that the report "sees" them at design-time.  You should give these columns generic names and then put the correct data into them from your application in the order that the user wants them displayed, leaving any unused columns null.  In your report you can set the suppress formula on the fields to suppress them if the value in the field is null.
 
Item 4
This is quite possible.  In the report design, right-click on each field in the details line of the report, select "Format Object" (in VS2005) or "Format Field" (in Crystal) and go to the Fonts tab.  Click on the formula button next to the Color drop-down and, assuming that "certain text" is always the same, enter something like the following:
If {table.certain_column} = "certain text" then
  red
else
  black
In the formula for StrikeThrough, you'll put something like this:
{table.certain_column} = "certain text"
(This expression just needs to resolve to True or False.)
 
Good luck!
 
-Dell
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.