PLEASE HELP ME!!!! (crystal report)

S

suki

Hi!

I use crystal reports on .net (framework 2.0).
in .net i click on my crystal report object (report.rpt)
There i can click on the report with the right mouse, select
database/set datasource location.
There i see the current data source (my xml file) :

Current data source/dsTitel (name of the dataset that is written in
this xml file)/properties/file path!

My question is:
How can i change THIS path at runtime????
I cant find it anywhere.....

Please help me, it is very urgent and i searched the whole net for
it.....

THANKS!

suki
 
C

chanmm

Just a suggestion. You probably can look through those files with
<filename>.designer.cs extension. Remember to click the show all files from
you solution explorer first.

chanmm
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


Super easy, just load your data in a dataset and use
ReportDocument.SetDataSource( theDataset);

you don't even need a file in the first place !
 
S

suki

Hi!

Thanks for your answer!

I think i tried this - but since i`m not very familiar in using crystal
report -
Maybe i did something wrong..
At the moment i do not have such a dataset...
Can you tell me how to create such a dataset?
(I have to link it to my Datasource: System.Data.DataSet();)
Is this possible and can you please tell me how to do this?

thanks a lot..... :)
suki
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

suki said:
Hi!

Thanks for your answer!

I think i tried this - but since i`m not very familiar in using crystal
report -
Maybe i did something wrong..
At the moment i do not have such a dataset...

What do u have?
The data I mean, where it's coming from? and in what form
Can you tell me how to create such a dataset?

Depend of the above answer, my example, I generate it from either an xml
file or from a SQL server.
(I have to link it to my Datasource: System.Data.DataSet();)
Is this possible and can you please tell me how to do this?

This is a pseudocode:

//get the datasource
sqlDa.Fill ( myDS ) ; // DataAdapter
or
myDS.ReadXml( path2file, XmlReadMode.ReadSchema); //or from a file

ReportDocument myreport = new MyReportName(); //this class is named like the
..rpt you created

myreport.SetDataSource( myDS);

//readty to rock :)
 
S

suki

Hi!

My data is coming from a System.Data.DataSet()!
I write this data set into a xml file - and i want to display this
dataset!! in my report.
I'll try it out and i tell you if it works this way!

and... thanks for answering...
i posted a lot of times in the special crystal report thread, but
nobody answered...
 

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

Top