Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report Design with C# Post Reply Post New Topic
Author Message
henchie
Newbie
Newbie


Joined: 18 Sep 2009
Online Status: Offline
Posts: 2
Quote henchie Replybullet Topic: Report Design with C#
     Posted: 18 Sep 2009 at 3:51am
Hi i am the first time here^^.

my Problem is. i have to open a report file with c# and change the rpt file with code. for example the add new fields in the detail block. i have not really an idea how to open and modify the rpt file by c# code. do you have any tips for my?

Thx for your help
OS
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 Sep 2009 at 6:26am
I wouldn't have a clue.  Also remember that rpt files are binary files, not text.  you can interact through code to do many things, but I don't know if it is possible to add a new field onto an existing report. 
 
At the very least, it would need to be field that is already defined in the dataset that the report was designed with. If the field doesn't exist in the dataset, I don't believe that is possible.
 
I haven't done any manipulation like that as it is simpler for me to design a report with fields that move from side to side and turn the visibility on and off...but you can do that from inside the designer.
 
There are probably methods that you interact with, but I don't know how robust they are.  The only ones that I have seen are concerned with setting of datasets or parameters, but I haven't used them.
 
 
IP IP Logged
henchie
Newbie
Newbie


Joined: 18 Sep 2009
Online Status: Offline
Posts: 2
Quote henchie Replybullet Posted: 18 Sep 2009 at 6:39am
Hi,

thx for your quick answer. the fields are already in the dataset and i know how to solve this in the designer, but our customer wants to have a programmed solution. so i try to find out a way how to open the areas.. sections untill i get the right position.
and then inserting the new fields... and save the rpt file. the sdk should do this but i am not very familiar with the crystal sdk.

thx
os
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum