473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Cyrstal Reports

Is it possible to design a report at Runtime? What I am trying to do is
create a very flexible report to have a different amount of columns. The
user can choose the fields from a database table they want to show on the
report. It can be anywhere from 1 - 10 columns.

I found this Visual Basic code, but I can't convert to c# because I can't
found AddFieldObject method in c#!! ¿?

Public Sub AddToDetails()
Dim crSection As CRAXDRT.Section
Dim crFieldObject As CRAXDRT.FieldObject
Set crSection = crReport.Sections.Item("D")
Set crFieldObject = crSection.AddFieldObject("{Customer.Customer Name}",
600, 0)
End Sub

Please, can somebody help me?
Dec 29 '05 #1
2 2211
Ümit,

If by design, you mean dynamically generate, yes, it is possible.

However, I am looking at this code, and it looks like the naming is
different for the types, like the old Prog ID convention, which leads me to
believe this is VB6.

I believe the object model for CR has changed for .NET, so this code
wouldn't be valid anyways. I would look at the documentation for CR that
comes with VS.NET, and then try and use that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ümit Kavala" <um**@set-soft.com> wrote in message
news:Op**************@TK2MSFTNGP11.phx.gbl...
Is it possible to design a report at Runtime? What I am trying to do is
create a very flexible report to have a different amount of columns. The
user can choose the fields from a database table they want to show on the
report. It can be anywhere from 1 - 10 columns.

I found this Visual Basic code, but I can't convert to c# because I can't
found AddFieldObject method in c#!! ¿?

Public Sub AddToDetails()
Dim crSection As CRAXDRT.Section
Dim crFieldObject As CRAXDRT.FieldObject
Set crSection = crReport.Sections.Item("D")
Set crFieldObject = crSection.AddFieldObject("{Customer.Customer Name}",
600, 0)
End Sub

Please, can somebody help me?

Dec 29 '05 #2

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eb*************@TK2MSFTNGP11.phx.gbl...
Ümit,

If by design, you mean dynamically generate, yes, it is possible.

You better check the CR forums, AFAIK the version shipped with VS do not
allow to dynamically modify a report.
IIRC I read this in one document from CR website.

NO idea if this changed with VS 2005.
However, I am looking at this code, and it looks like the naming is
different for the types, like the old Prog ID convention, which leads me
to believe this is VB6.


Yes it's , take a look at the "Set " sentence, it's definetely VB6.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
2
by: Andrew | last post by:
Hi there: I can successfully control a report's GroupLevel ControlSource property by using: ..Reports!rptEESTMT_A.GroupLevel(i).ControlSource = "CorpName" where rptEESTMT_A is the actual...
0
by: Ian | last post by:
(Sorry if I have repeated this, it did not appear the first time) I have the following code on a button. The idea is that when this button is clicked it prints several reports automatically then...
5
by: Jason Huang | last post by:
Hi, In my ASPNet C# Windows Form, how do I open a Crystal Report without using a Crystal Report Viewer? And in this situation, how do I pass parameter value? Thanks for help. Jason
2
by: B.Newman | last post by:
I've got some VB.NET code that *should* get a list of reports from an Access MDB and populate a list box with them. It doesn't detect any of the reports at all. oAccess.Reports.Count comes up as...
1
by: Agnes | last post by:
I use vb.net to preview the report (it is designed by cyrstal report), and there is "X" button on the left hand side of "refresh", when I mouse on"X" button , it said "close current view" However,...
3
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
3
by: Tyranno.Lex | last post by:
I am using Visual Studio .NET 2003 and have successfully deployed a commercial web application written in C# and ASP.NET. I am now wanting to add reporting using Crystal Reports and am having a...
0
by: anamika | last post by:
Hi We all know its very easy to pass a sql query to Crystal Report from vb.net However, my requirement is that I want something which is exactly opposite to this. My Cyrstal Report has generated...
2
by: Jason Huang | last post by:
Hi, I was running my C# Windows application, when I tried to use the CrystalReport in my application, it gave me an error message saying I need to purchase using right from Crystal Decisions....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.