Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-11-10
4
Medium Priority
?
38 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 35

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
 
LVL 1

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 101

Expert Comment

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

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

mlmcc
0
 
LVL 1

Author Closing Comment

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

963 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