Friday, March 16, 2012

please help me to solve my provblem..its very urgent

i have a button in my webform. whenever i click that button it should display the crystal report designer window so that the end user can design his own report...
i don't know how to display crystal report designer window at runtime in asp.net.please help me...

please please help me...its very very urgent

Hello Niranjana,

A CrystalReportViewer needs a CrystalReportSource in order to function. So, in the scenario you outlined above, you'd need to dynamically add both to the page. In VB.NET, this would look something like the following:

 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim crs As New CrystalDecisions.Web.CrystalReportSource crs.ID = "CrystalReportSource1" crs.Report.FileName = "CrystalReport1.rpt" form1.Controls.Add(crs) Dim crv As New CrystalDecisions.Web.CrystalReportViewer crv.Height = New Unit("200px") crv.Width = New Unit("200px") crv.AutoDataBind = True crv.ReportSourceID = "CrystalReportSource1" form1.Controls.Add(crv) End Sub

HTH,
Clay


sir,

thank you so much for ur information.

but my problem is different. I need to design the crystal report at runtime... ie one end user be able to design his crystal report.. ie adding fields ,formatting crystal reports all those things...

if u have any idea please help me sir

thanks & regards

nisha


Hi nish,

I dont whether its possible to enable the users to design his own reports... But try the below logic...

1. You need to list all of the fileds available in the reports...

2. Create the query which fetches the data from the table for the fields selected by the user and empty for unselected fileds. (initially you need to design the reports with all the fields)

3. suppress the fields in crystal reports if the field value is empty.

I hope the above will help you...


that i can do sir,i have already listed all the fields of a table in a listbox and use that to create crystal report...

my problem is really different...the end user should able to design his own crystal reports.

at runtime the designer should come. can we use any Report Designer Component(RDC) in asp.net...i am not getting an exact idea from net also. if u can please help me sir...


Hi nish,

Sorry I dont know whether its possible or not... I think its not available in Crystal reports... but may be in some other third party report tools...


anyway..thank you sir..

0 comments:

Post a Comment