Need multiple copies of the same report in Crystal Report - visual-studio-2010

I am stuck with a peculiar problem. Here is my situation. I have an invoice designed in Crystal Report. I want to provide a feature wherein the user can print multiple copies. The statutory requirement is that every copy will have different title (for e.g. 1st copy may have "Original", 2nd may have "Duplicate for Transporter", etc.) The invoice already has 2 sub-reports (1st for the items and 2nd for tax details). Now I am stuck up as to how do I get multiple copies of the same report with different title. Tried using sub-report but according to crystal report, one cannot use sub-reports within sub-reports.
Request all to please help me some idea. I little new to crystal report. Thanks to all in advance.
My environment is VS 2010, Crystal Report v13, SQL Server 2008, .NET 4.0.

If all data on your reports are the same and only the title is changed, you can set a textObject variable for your title on VB.
Here's how
Dim T As CrystalDecisions.CrystalReports.Engine.TextObject
T = cryRpt.ReportDefinition.Sections(1).ReportObjects("yourTextObjectFromXtalReport")
T.Text = "Your Title"
All you have to do is to set conditions on your program if you want to have multiple reports.
You can also print crystal reports programmatically by following this.

You can create a parameter Title and set the value each time you are printing the report. Drag the parameter to the report in order to have it printed

Related

Crystal report summary depending on another column

Image:
Hi, i am new to crystal reports but a fast learner.
I need to make a report, that shows the price of specific maintenance during a month.
The important thing is that the Total values are correct
As you see the "arbejdsordre" can appear multiple times because on the same column it has different "titel" the different "titel" has different "planlagt tid" but the same "Omkostninger"
I need to tell crystal report to only calculate "omkostninger" for "arbejdsordre" one time when "arbejdsordre appears several times.
how can i do this?
Best regards
André
If you go into the Group Expert and then group your report data by Omkostninger you should be able to accomplish your goal.
Display the value for "Omkostninger" in the Group Header, and then display the different "titel" and "planlagt tid" in the details section or any other group header section that is a lower level grouping than Omkostninger.
This will allow you to display each unique value for Omkostninger once and only once on the report, with all of the other data for each Omkostninger value displayed in the details.

dynamic filters in ssrs to let user enter values

I have a report which displays Activity, product, Customer etc values. I need to provide filters (textboxes) so that the user entries values to it and based on that the rows get filtered(after refresh). Is this possible to achieve in ssrs. If yes, please help with how
Refer below links for SSRS :
http://www.sqlcircuit.com/2013/09/ssrs-how-to-add-input-parameters-in.html
https://romiller.com/2008/07/29/searchable-dependant-parameters-in-ssrs/
Local reports (RDLC) don't have the parameter bar. But you can make your own controls on the page to get the parameter values, and then use code to pass those in to your local report.
Googling RDLC parameter gives lots of advice, for example this video which shows how to do it:
How to create RDLC report with parameters

Could a Matrix mimic this Crystal Report structure - SSRS

I'm trying to convert a Crystal Report to SSRS and I'm having trouble with this section of the report.
The first line of the report event information: date, name, recruiter, hours, etc.
And then under the summary, the report should list changes that are considered critical changes to information about the event. Within Crystal Report, these changes are in the Details section and all changes are listed under each event.
I am trying to accomplish the same task within SSRS but I'm having some trouble with the changes summary. The event summary displays for each record of a change. In the screen shot below, you can see that DriveID 682144 had three changes, but for each change, the event summary is displayed/printed. So instead of Evoqua listed once and the three changes made to the event listed underneath, I am getting the summary displayed for each and every change within the report.
I have a row grouping for DriveID since each event has an unique ID. And I also have a Details row group that displays the changes. I've tried adding a grouping on the Details row group, but if I group on SourceDriveID, it will only display one record for each drive. I am joining the two tables on DriveID (Drivemaster.DriveID=CriticalDriveChanges.SourceDriveID)
I think it would work if the Critical Drive Changes view had a unique identifier, but it doesn't so I am trying to work with what I have. Any suggestions on making this work?
If there is anything I need to explain better, please let me know. I've been stuck on this for two days and need to get through it.
Thanks,
Your second group needs to be grouped by the key of the “changes” and not the DriveID. It’s already grouped by the DriveID because of the parent group. Grouping by the same Field again effectively gives you an extra summary row, its showing the first of the changes.
This can be done by customized summary. You can have a global variable for the summary, and use expression to do the calculation. Some tricks are needed for this kind of report.

Crystal Reports 2008 conditional sub reports prompt for parmeters twice

I am using crystal reports 2008 in PeopleSoft with a SQL Server backend. I have a Master report with an underlying query which filters on parameters passed to Crystal Report (EMPLID and Calendar Year these are the underlying tables' Primary Keys).
The master report has sub reports all linked to the the master's EMPLID and Calendar Year fields.
At this point everything works I enter the emplid and year at the prompt and the report runs filtering on those fields.
Each year, the report will change. I set up the subreports so that when I enter 2014 in the prompt, the 2014 version of sub report A will display. If I enter 2015, the 2015 version displays.
When I add these parallel subreports, I get prompted twice. I have checked all of the sub report links. I have made sure that each link selects data in the subreport based on the master field, not the subreport parameter field. I have tried this with conditional subreports and conditional sections and get double prompts. I am stumped. Any ideas of how to use conditional subreports in this way without being prompted more than once?
If this works I intend to add sub report versions for each year. If anyone can think of a better approach feel free to let me know. Thanks.
Firstly...
Have created similar parameters in sub report as main report and linked both sub report and main report parameters using sub report links? If you have not done that then will suggest you to do that so that only once parameters are prompted.
Now.. I don't think your approach is suggested where you are manually adding one sub report for one year, What I would suggest is you to take only one sub report and pass the parameter to the Record Selection formula of the sub report so that I will pick data as per the parameter and your report will also be not complex.
Let me know if you have any different issue.

How do I grep (search) a Crystal report for all uses of a column?

I am trying to remove all references to a table from a Crystal XI report. Crystal is telling me that a column from that table is currently being used, because there is a little green check mark over the field in the field viewer. Also, if I try to remove the entire table, I get a warning. The warning is almost useless though because it doesn't tell me where the field is used. Now, back when programmers were real programmers, and mice were things cats chased, I could just grep a directory or file and find all references to a variable I was interested in. But how do I do this in Crystal? I have already tried exporting the report to a Report Definition, which helped find some instances of the troublesome field. Unfortunately, that format does not include all formulas, just some. Please tell me I don't have to buy a third party app (or write my own COM thingy) just to do this seemingly simple thing.
EDIT to add details about tangential point:
In case anyone is wondering, I am not crazy - I have duplicated the issue where a formula's definition does not show up in the exported Report Definition. I created a new blank report, created one formula named stealth that returns 1234. I then used that formula in the Section Expert for the details section, in the "suppress" formula, setting it to {#stealth} == 0. the use of the formula shows up, but not the definition. So when my unwanted column was used in the formula, I was not be able to find it! Here's what the rpt def looks like (after deleting some blank lines):
Crystal Report Professional v11.0 (32-bit) - Report Definition
1.0 File Information
Report File:
Version: 11.0
2.0 Record Sort Fields
3.0 Group Sort Fields
4.0 Formulas
4.1 Record Selection Formula
4.2 Group Selection Formula
4.3 Other Formulas
5.0 Sectional Information
5.1 Page Header Section
Visible, Keep Together
5.2 Page Footer Section
Visible, New Page After, Keep Together, Print At Bottom of Page
5.3 Report Header Section
Visible, New Page Before
5.4 Report Footer Section
Visible, New Page After
5.5 Details Section
Visible
Subsection.1
Visible, Keep Together
Format Formulas
Visible: {#stealth}= 0
If all else fails ...
File -> Export -> Export Report, then choose the Report Definition (TXT) option.
That will give you a plain-text representation of every element of the report. You can grep or CTRL-F or (insert search tool of your choice) through that. "Find in Formulas" usually works, but I've had to go the export route a couple of times, for no apparent reason.
Edit: Of course, if I'd bothered to completely read your post, I'd see that you've already done this.
Very curious.
If you right click on the field in Field Explorer and select Find in Formulas, it should bring up a dialog listing all of the places it is being used in formulas. On the left hand side of the dialog is a tree of all the possible places it could be, including oddball places like record selector and page formatting functions. Unfortunately, it does not seem to list running total fields.
EDIT: Oops, all the places it exists is listed at the bottom of the dialog; the tree view is the entire "DOM" of the report.
I know this is an old post, but...
Not knocking the Find in Formulas, it's been saving me today, but i was having trouble finding the last instance of the field. Even after all of the formulas and the droppings on the report were taken care of, I still had one lone use hiding somewhere.
I found it hiding as a Subreport Link. Right click on the Subreport -> "Change Subreport Links..." and there was the culprit. Dropping in this post because I figured someone else might have this problem too.
Fields can also sometimes be hiding within "Record Sort Expert"
Responding to an old post, but ran into a similar issue. I had a group based on the formula I wanted to delete that had a specified order. When I changed the grouping to a different field, the specified order remained. When I removed the specified order, my formula could be deleted.
This was tested on XIr2...
You change the tables datasource through the "set datasource location" dialog. Now, when it goes into the column mapping mode, uncheck match-type and pick a new column that would cause an error in a formula. (i.e if the column you're looking for is a string replace it with a datetime column). Go to the preview and you should get an error box like "A string is required here.", close that error and up pops the offending formula!
One more suggestion. After following a lot of the suggestions here, my report was still telling me the formula was in use. I had to close the report. When I opened it again, the check mark was gone and it let me delete it. This was on Crystal v 11.0.0.1282
In my case the Formula Field happened to be part of an old Running Total Field, which itself was not included in the report. Once I deleted this old Running Total Field I could delete the unused Formula Field.
Very late, but i use CR 2008 (12.3.0.601) and just today (6/16/2015) i am trying to document only the formulae of my report. I knew about exporting the Report Definition, and Finding a Formula in all Formulae. But there are about 50 Formulae. I discovered that the exported Report Definition didn't document all of my Formulae, but I didn't bother to uncover the logic behind that; instead, i plopped all Formulae into a section, then exported the Report Definition. Voila. Of course, i still need to cull all the unnecessary definition elements. But at least i have all Formulae.
So with all the great selections.. I still had one instance hiding from me. I found out where it was by creating a clone of the data table and renaming\deleting the field.
I then used the "Set Database Location" as suggested above to point to my new table. It did error out when it could not find that field but still didn't tell me where it really was (it just said report field).
I did NOT map it and clicked continue which deleted the field from the report. I then mapped it back to the real table and I was good.
In my case, there was a Chart, and the field was being used as one of the "on Change" fields.
Although an old post, this functional gap still exists within Crystal Reports itself. We have a fully functional 14 day trial of our third party software that uses the latest Crystal.net API to search for plain text within a library of Crystal RPT files in one fell swoop. Also searches the data saved within reports, and text within labels ... as well as datasource behind all your reports ( stored procedures, views, and table data ) with support for SQL Server, SQL Azure, MySQL, Oracle, Amazon RDS, DB2 and Access.
More info and trial downloads at http://www.finditez.com
Note, you will need to download and install the compatible SAP Crystal.net runtime connector for searching your RPT file library.

Resources