.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

dynamic Dataset-Crystal Report

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
Hello everybody, i'm developing a C# application in which i'm using crystal reports to display data from database. i'm trying to create a dynamic dataset since it's going to be filled from multiple classes i'm not able to fill these dataset unless i add to my sql query the "column AS columName" for example:"select nmClient as Name from customer " ; if i write down "select nmClient  from customer", it won't work   please let me know if there any ulternative solution in order to solve my problem   thank you in advance  

View Complete Post

More Related Resource Links

Include a Crystal Report in .NET Web Service for Dynamic In-Memory-Only DataSet



I would like to use Crystal Reports in a .NET web service.  Ultimately I would like to convert my report document to a PDF and then return the PDF as a byte array. 

My .NET DataSet is generated dynamically at run-time.  It consists of four related tables.  Since my DataSet does not have a physical datasource, I created an XML Schema file.  I then added the XML Schema file to the web service project with Add Existing Item. 

A solution for working with a dynamic in-memory DataSet exists for ASP.NET web sites and client-based forms.  I tried to use this method as it is published.  When that didn't work I tried creating the report and XML Schema directly in the web service project, but that also didn't work.


The problem is apparent when you try to set the datasource.......the code bombs on the call to SetDataSource(DataSet) with the message
ex = {"The data source object is invalid."}

Crystal Reports would save me a lot

Crystal report with dataset and list - please help


Hi Guys;

i'm new in reporting so thanks to be patient with me,

here is my problem, i have created a report then a report viewer,, i passed some parameters to the report it goes well.

i'm working with local data stored in List<object>, i tried to fill my dataset (data) with those local data stored in the list, i filed Cry

looking for yor help


how to connect anot sql dataset to crystal report

hello i have adynamic dataset wuch i create and not from sql or access table i have acrystalreport and i want to connect the report to the dataset   tnx Adnan Mahajna 

Crystal Report with DataSet, DataTable (Having Problems)

Hello All,     I am a bit new with Crystal Reporting and I was given the Job to take an exisitng report , modify it and load it on a website... the report part is done but the loading is been a pain. So here is what i did,    protected void Button1_Click(object sender, EventArgs e) { SqlConnection cn = new SqlConnection("server=ss;uid=sss;pwd=ss;database=sss"); cn.Open(); #region quer //Query Here, This is working fine #endregion ReplaceEscape(qry); SqlCommand cmd = new SqlCommand(qry, cn); cmd.CommandTimeout = 1000; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet myDataSet = new DataSet(); da.Fill(myDataSet, "DSAllStatQuery"); ReportDocument cryRpt = new ReportDocument(); cryRpt.SetDataSource(myDataSet); cryRpt.Load(@"C:\Users\erodriguez\Documents\Visual Studio 2010\WebSites\AllStats\CrystalReport.rpt"); CrystalReportViewer1.ReportSource = cryRpt; cn.Close(); } public static string ReplaceEscape(string str) { str = str.Replace("'", "''"); return str; } I crea

Creating Dynamic Group Fields for a Crystal Report?

I have a VB.Net application which generates quite a few Crystal Reports. One report in particular has a Group Section. What I am trying to do with my VB.Net app is pass a value (a sql server column name used in the report). This value is represented by radio buttons. For example, the user may check either "ZipCode" or "State" or "Category" or "Type" or "Vendor". Each of these options represent a column in the database table used in the report. I simply want to be able to write the "SelectionFormula" using one of these options but not sure how to go about it. Thanks, Blake

Using Sub reports and dynamic crystal report generation

Hi..........friends,         I am working on crystal reports to generate Ration card details.My form  consists of the fields like Address details of the ration card owner,existing ration card details and family members details.in these Family Details i have to generate dynamically according to the count of the family members.I am new to crystal reports.I am confusingabout whether i have to use sub reports or formula fields.................               Plz help me                                                                    Thanks in advance      

generate dynamic fields crystal report

  I want to add a Dynamic column in Crystal report at run time. Because I dont know about the columns in design time. The columns will come based on the user selection. So i want to Add a column to Crustal report at run time. I am using Crystal report. If it is not support to add column in Crystal report at runtime. Please kindly give the other solution or other third party tool like. Which version will support to add dynamic column in Crystal report? i already used the crosstab report but thats not work for my scenario.becoz i want to add another colums at right side ( after total of each row ) , which is crosstab report not supported 

Dynamic Report in reportviewer


HI I m sorry to say this But this task too urgent.

 Ex- i have two tables in my db name called Comdetails, deptdetails.

TCS is a one company name stored in ComDetails and Company_ID took as primany key,

TCS having 10 department stored in deptdetails and Company_ID as foreign key.

so now in DB we have available one company with 10 departments.

so now i need to generate report , i m using report.rdlc and reportviewer.

i hope upto now its clear.

my task-

1- i have two pages in a report in page 1 i m doing designing report like top i  need to show companydetails, middle frist department details in deptdetails table , and bottom some calculation part leave about calculation part. in report page 2 on  top i need to show second department details from deptdetails next below the design again same design i did here i need to show 3 department details from deptdetails next below the design again same design i did here i need to show 4 department details from deptdetails next below again calculation part design leave about calculation part. so up to now i shown 4 department details here still i need to show 6 department details , for this programatically after 4 department details finish next generate dynamatically page 2 of re

Printing crystal report from webservice



I am trying to print crystal repot directly from a C# application, which is calling webservice. I am able to display report in crystalreportviewer by passing the webservice call to datasource. However, is there anyway, I can print directly without showing the report?

Alternatively, I was trying return ReportDocument object from webservice, which would solve my problem, but I was unable to return the ReportDocument because of serialization issue. Is it even possible? Thank you


Crystal Report Asking for Database Authentication each time when I view Page.


Whenever I open my Crystal Report page, I am taken to the Database Authentication page where I am asked for

User name
Data Name

each time.

Is there a way to avoid this and I save these authentication in my page once.

I am using VS2005, C#.

Any Help will be appriciated.


Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

Crystal Report parameter value window.


 Hi friends,

   I am using Crystal report which displays the result of stroed procedure which have 2 paramater.

  When i run report it shows two window for getting each parameter.

  My need is, can i have one window for getting all the paramter value for stored procedure.


  With Advanced thanks,






Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T


when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Stack Trace is :-

Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204

Crystal Report vs 2003 convert to vs 2008 parameter problem


Hi friend,

I have a project develop with Visual Studio 2003, when i convert the project to Visual Studio 2005 is work well. But when i convert to Visual Studio 2008, the crystal report when have pass parameter will prompt the parameter field to re-type then show the report.

But in this converted project i create a new report and pass the parameter is ok. That means i wan re-do all report @.@??

Does someone can help me solve this problem??

Thank you

Crystal report


Hi frnds,

              How to use crystal report in asp.net 3.5 using C#?.....

crystal report -visual studio 2008 dual axis chart (bar & line)


dear all, 

i use crystal report integrated with  vs.2008, and i want to make chart with dual axis (bar & line).

i have used bar chart and input the data with 2 values..

then in chart options > template, i activated the dual axis..

my question is, how i can change the 2nd value with line chart not bar chart??

i'd tried to find the right settings in "chart options" but still can't find the solution.

for information in "chart options" there are 4 sub menu : template, general,titles,grid..

i read in a tutorial there's more sub menu called "series" in crystal report (stand alone version)..

is it possible doing it in Crystal Report VS. 2008?

please,, i need your advice and solution..

Thanx before..


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend