Solved

How to add a word to a row in crystal Report in C#

Posted on 2016-11-10
4
27 Views
Last Modified: 2016-11-15
Hello experts, I am doing an application in which I have to print some data using crystal report,
for the data I am using MySql.
In my database, I have a field which shows numbers of months so it is something like this:
User       Prevision

Test         3 MONTHS

So, in my database my column prevision shows the number of months and what I need is to add MONTHS to the field in crystal report... PS: I don't want to add "MONTHS" in the database but only show it in the crystal report. I can do it in datagrid easily but in crystal report I didn't make it. Thank you.
0
Comment
Question by:SniperCode Sheva
  • 2
4 Comments
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41881931
open a new project C# - > Right click on the project -> Add new item -> reporting - > Crystal Report -- >report type - > Using report wizard - > standard report -> Oledb connection --> <<oledb driver for SQL SERVER>>  provide connection details- > select table -> click ok..
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(path of the crystal report..\\CrystalReport1.rpt");
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();

Open in new window


Set by step approach - http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm
Hope it helps.
0
 

Accepted Solution

by:
SniperCode Sheva earned 0 total points
ID: 41881938
It is not the answer that I wanted thank you I figured out the solution  
concat(Prevision, ' ', 'MONTHS')

Open in new window

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 41881983
You can do it in a Crystal formula with

CStr({YourField},0) & ' Months'

mlmcc
0
 

Author Closing Comment

by:SniperCode Sheva
ID: 41887627
The other solutions were not good
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question