Cyrstal Reports

  • Thread starter Thread starter Ümit Kavala
  • Start date Start date
Ü

Ümit Kavala

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?
 
Ü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 said:
Ü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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top