dynamic generation of crystal report

  • Thread starter Thread starter abroc
  • Start date Start date
A

abroc

sir,
i due course of my project i have come up with the need of dynamically
generating my crystal report as the input to the report is the
datatabale which is dynamic by nature and is constructed on the fly
when user make selection in a list box. The number of selection he
makes and the type of selection he makes define the structure of my
table at run time. i have been able to construct the ddata table but
now how to feed this table into the crystal report at run time is
what i want to know.
if you have implemented such a thing in crystal report 9 using vb.net
or c# before then please help me
thank you
puneet
 
Hi Puneet,

If you have the data in a dataset, it's extremely easy.

What I do is
1) run an sp which deletes table 'changingtable'
2) run an sp to create table 'changetable' - it is now empty
3) open changetable and loop through your datatable incrementing changetable
with each row
4) run the report- it should have a reference to changetable and the columns
it needs to display

Thus, changetable has different data (all columns) each time it is
recreated.

HTH,

Bernie Yaeger

abroc said:
sir,
i due course of my project i have come up with the need of dynamically
generating my crystal report as the input to the report is the
datatabale which is dynamic by nature and is constructed on the fly
when user make selection in a list box. The number of selection he
makes and the type of selection he makes define the structure of my
table at run time. i have been able to construct the ddata table but
now how to feed this table into the crystal report at run time is
what i want to know.
if you have implemented such a thing in crystal report 9 using vb.net
or c# before then please help me
thank you
puneet
 
sir,
first of all, i would like to thank you for replying in responce to my
query, but still my problem is where it was, even if i have data in my
new TempTable, how is it useful to me because still i don't know how
to insert that data into my report at run time. How to place the
data i have in my table at run time, by writing code and without
making use of the wizard and draging and droping fields on the report
is still a mystry to me. I will be very greatful to you if you could
tell me how to do the same.
Once again thank you for replying back
Puneet
 
Hi Puneet,

I don't understand - what is the value of using code to place the data on
the report? If the report is created inside crystal, layout out the fields
of data as you need them, setting up whatever grouping is necessary,
formulas, running totals, relationships, etc, and then the report runs each
time against the newly created data, why is this not exactly what you want?

I have users who select, say, customers from a listbox; I then dynamically
create the table to that contains only these selected accounts, and the
preformatted report runs, showing only those accounts. Isn't that what you
want?

HTH,

Bernie

abroc said:
sir,
first of all, i would like to thank you for replying in responce to my
query, but still my problem is where it was, even if i have data in my
new TempTable, how is it useful to me because still i don't know how
to insert that data into my report at run time. How to place the
data i have in my table at run time, by writing code and without
making use of the wizard and draging and droping fields on the report
is still a mystry to me. I will be very greatful to you if you could
tell me how to do the same.
Once again thank you for replying back
Puneet
 
abroc said:
sir,
i due course of my project i have come up with the need of dynamically
generating my crystal report as the input to the report is the
datatabale which is dynamic by nature and is constructed on the fly
when user make selection in a list box. The number of selection he
makes and the type of selection he makes define the structure of my
table at run time. i have been able to construct the ddata table but
now how to feed this table into the crystal report at run time is
what i want to know.
if you have implemented such a thing in crystal report 9 using vb.net
or c# before then please help me
thank you
puneet



----------------------------------------------------------

----------------------------------------------------------
color]

Hi,

in this
http://support.businessobjects.com/communityCS/FilesAndUpdates/vbnet_win_samples.exe.asp file is an example.

Greeting

Thomas
 
Back
Top