473,466 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to add database field dynamically into Crystal report in C#?

16 New Member
Dear

How can add database field dynamically into Crystal report using C#.

I want to get change crystal report with respect to

Database field.
Oct 21 '10 #1
1 5818
Currently there is no way to do this directly in crystal report. You can achive this facility by doing it anotherway.

if your report is haiving fixed no. of columns. then you just design the report this way.

1. give the caption of column with parameters (not fixed label)
e.g: filed1, field2,field3 ...etc.
and your query(Strored procedure) must be like
e.g: select emp_name as field1, age as field2,...etc

at design time use any dummy sp having number of fields same as your report.

at run time you can assign column caption by passing parameters ...


it will work.

I 've done this way variable number of columns too. for variable number of columns you need to keep multiple templates with different number of columns report.
Oct 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Oleg | last post by:
Hello all, I am having problems with adding new fields (from a database) in VisualStudio.NET into an existing report - the Field option is greyed out for some reason? I checked the database path...
1
by: david risby | last post by:
I'm getting an unwanted database login form appearing when I set the Data Source of a Crystal report to a .Net dataset e.g. myReport.SetDataSource(myDataSet This only occurs on some PCs, works...
0
by: Steve | last post by:
I know this might not be the best place to get help for this particular problem, but here goes.. The 2nd edition of ProfessionalCrystal Reports for Visual Studio .NET states "you will learn how to...
0
by: Jorge Luzarraga Castro | last post by:
Hello, Hope anyone can help with this. I´ve got a rpt that I want to show in an ASP ..NET appl. This rpt file works on a dataset which has different tables defined by a different select inside...
0
by: Ray | last post by:
Dear all, Now I am using the report document in vb.net to call the crystal report and I will set the database information in the report document. The code is as follow: ......
6
by: Agnes | last post by:
Please help, i had completed over 30-50 reports, now. our client insist to change the database name. anyshorcut that I can change the database name in the report without re-write all of them ??...
4
by: serge calderara | last post by:
Dear all I am not able to set the PAssword field of a tables logInfo structure ??? I do it as follow : For Each crTable In rptDoc.Database.Tables crReportTabeLoginfo = crTable.LogOnInfo...
2
by: buterfly0707 | last post by:
To Get sum of field in crystal report hi i have some problem while getting the sum of the field. i want to get the sum of one filed fro example Debit. but i want to get this sum according to...
3
by: thesti | last post by:
How to set the database file (MS. Access db) for a rpt file (Crystal report) programmatically in vb6? the problem is that, the rpt file is referring to the mdb file using an absolute path. so,...
1
by: tomy1980 | last post by:
how to split a date field in crystal report... for example if the date is 23/08/2010 i want it separated and stored in different bdifferent variables like a = 2 b=3 c=0 d=8 e=2 f=0
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.