.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

Dynamically change column names in Crystal reports - ASP.Net

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
Hi I am developing an application in ASP.net 3.0 and MY SQL database . I want to display column names & values in crystal report as user selects in ASP.net application  and column names and corresponding values will be changed dynamically. Any help/suggestions and sample code would be appreciated. Thanks in advance....  

View Complete Post

More Related Resource Links

dynamically change column names in Crystal reports


I need to develop 3 pages.

On the first page user defines atmost 7 column names to be displayed on the report. I'm saving these names in a Sql DB table 'Columns' with Column_Nm and Column_ID as Table columns.

On the second page I'm retrieving column_Nm from the table and displaying them on the page so that the user enters the data. This data is saved in another table 'Summary' with the Columns column1 through column7.

on the 3rd page I need to show a report of 'Summary' table.

How do I dynamically replace column1 through column7 names with that of 'Column_Nm' on the report?

Any help/suggestions would be appreciated.


How do I change the order of column names in EditForm.aspx

I have an Announcements list to which I've added extra columns: Publish (date), De-Publish (date), and Category (choice).  When I go to EditForm.aspx, the columns display in this order: Title , Body, De-Publish , Category and Publish . I'd like to change the order of the columns on EditForm.aspx so that it is Title, Body, Category, Publish and De-Publish . Changing the All Items view doesn't do it. How might I change the order of columns that is shown to the user?

How to get List and Folder Names in a Column Dynamically


We are using MOSS 2007 Farm for our Intranet and we are using it increasingly for Document Management. To achieve this we want to code every Library and Folder and use the code as part of the Document Number. To make this easier for users I have created drop down lists and calculated fields which create the Document Number. Now the number of folders is getting bigger and I would like to filter the lists to assist.

Specifically, I am trying to filter a list based on the document library or folder in which the document is. To do this I tried using the Filtered SharePoint Lookup Field: http://filteredlookup.codeplex.com/ and develop a CAML query along the lines of (I am very new to this!):

      <FieldRef Name="Area" />
      <Value Type="Text">AREA NAME
        <FieldRef Name="Sub Area" />
        <Value Type="Text">SPContext.Current.List["Title"]</Value>

As another wo

Change column names in report based on another dataset


My report displays a result set from DataSet1 which contains non-descriptive column names that are shown as my column headers.

A1, A2, A3, A4, ...

I have a second Dataset that contains 'friendly' names:

A1  Jan

A2   Feb

A3  Mar


How can I map the friendly names from DataSet2 to the column names that came with DataSet1?

Thank you for any help you may be able to provide.

crystal reports on mvc 2 vs2008


hi, i'm a new user of mvc 2, so, i need to use crystal reports on mvc 2, actually, i'm developing on visual studio 2008, but i can´t run my reports. it's posible run my reports???

thank you very much.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

Session with Crystal Reports on IE 8



Having a very wierd problem.  I have an application that uses Crystal Reports and it uses what I have found to be a common scenario (I am not a CR expert in any way).  I have an ASPX page that gathers options for the report, and then it goes and gets the data and if there is some, a button appears for them to launch the report.  On clicking that button, the code sets some values in the HttpResponse.Context area, then performs a Server.Transfer to another ASPX page that is our Report Template.  This page contains the CR stuff and it generates a PDF version of the report.  It then does the following code:

 With HttpContext.Current.Response
            .ContentType = "application/pdf"
            .AddHeader("Content-Disposition", "inline; filename=Report.pdf")

Desperately need help with crystal reports


Hi All,

 I am new to .Net and And I have absoutely no idea about crystal reports. Can anyone please let me know a step by step process of how to design and generate a crystal report in vs2005

I need to ask for start date and endate.. when selected .. i should genarte a report using the existing stiored procedure and the connection string in my web config file..

Please  help.........

Your help willbe very much appreciated..


Crystal Reports: Add Professional Quality Reports to Your Application with Visual Studio .NET


Crystal Reports for Visual Studio .NET provides a comprehensive reporting solution for .NET developers that is thoroughly integrated with both the Visual Studio .NET IDE and the .NET Framework. Crystal Reports supports ADO.NET, XML Web Services, and ASP.NET server controls and caching. It also integrates seamlessly with the Visual Studio .NET Server Explorer, toolbox, and design environment. It has a rich programming model and flexible options for customizing and deploying reports. These major features and others covered here take the drudge work out of data representation in your own applications.

Andrew Brust

MSDN Magazine May 2002

dynamically change html code when user is authenticated


So I have a fairly simple web site which allows an Administrator to edit some data in a database which is displayed on some web pages.

The main navigation on the site is shown in the code snippet below. The Admin link goes to a Login.aspx which allows the Administrator to log in - once authenticated they get sent to the data edit page.

So my question is, how could I dynamically add a link to the data edit page in the <ul> list below once the user is authenticated ?

This would allow the authenticated user to see links to the secure pages in the main navigation bar.

<%--Top Navigation Menu --%>
<div id="topMenu">
<li><a href="default.aspx">Home</a></li>
<li><a href="introduction.aspx">Introduction</a></li>
<li><a href="curriculum.aspx">Curriculum</a></li>
<li><a href="times.aspx">Times & Fees</a></li>
<li><a href="staff.aspx">Staff</a></li>
<li><a href="login.aspx">Admin</a></li>
</div><%--End of topMenu Container--%>
<div id="clear"></div><%--Floats items cleared End of Master Page--%>

Crystal Reports can grow fields with large amounts of text layout problem


A can grow field in the details section of a crystal report may have so much text that the section will be larger than the remaining space available on the page (the space below the previous record).  The section has vertical lines on it with Extend to bottom of section when printing set to true.  The section starts on a new page (and may continue on the following one).  I want it to start on the page where the last record was laid out, and continue to the new page without leaving a gap with vertical lines on it.  I'm using Crystal Reports 9 and I can't work out how to do it. Has anyone got a solution?

Problems connecting stored procedure to Crystal Reports


I am working on updating a reporting system that uses Crystal Reports.  All of the 250+ reports were created in CR 8 and I have been opening up the old files in Visual Studio 2005 and updating the database location.  All I have had to do with all connections to views and even a couple of stored procedures is create a new connection to the database and then update the old report's datasource location.  The reason I need to update the location is so that the .NET application will use the correct driver.  Everything has worked fine up until I got to one stored procedure.  The old version of the report works perfectly with the stored procedure, but when I try to run the report using VS 2005 I keep getting errors.

First I connected to the database using the Oracle OLE DB provider, then updated the location of the stored procedure in the report.  It then prompts me for the two parameter values for the stored procedure, both of which I keep as NULL so that the report parameters will be passed to the procedure.  Then I get the following error:

Query Engine Error: 'ADO Error Code: 0x
Source: OraOLEDB
Description: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'STORED_PROCEDURE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored'

The proce

Duplicate column names from forms in SharePoint lists



I'm in the process of migrating from a WSS 2 site to WSS 3/MOSS. On the old site I used an Infopath 2003 form for absence requests. During the migration I now use Infopath 2007. There wasn't any problem initially when the form was stored with the SharePoint form library. However, when I published the form as a content type from Infopath 2007 and then added that content type to the form library, there are two columns for each piece of data from the form. (One from the content type and one from the form list.) I relinked each old form (list content type) to the new AbsenceRequest content type and removed the original one from the list. However, the duplicate column names are still there. Since they came from the Infopath form, they are not editable or deletable from the SharePoint list management interface. The duplicate column names make it tough to build views since it isn't apparent which column to use in the form building UI. It can be determined form the overview display, but it is very cumbersome.


Does anyone know a way to get rid of the old, absolute, columns?

Change Templates Dynamically in Silverlight


Silverlight has the flexibility to modify the look of your controls dynamically at runtime with just a few lines of code. Take a look at Figures 1 and 2 and you will see two different views of the same list box and data. To accomplish this, you simply need to setup two different resources of XAML code that you can switch between at runtime.

More Detail 
Figure 1: More detail

Less Detail 
Figure 2: Less detail

The Product Class

For this example, I will be using a simple Product class with four properties, and a list of Product objects using the Generic List class. Create a Product class as shown in the following code:

public class Product {
  #region Constructors

  public Product(){ }

  public Product(int id, string name, string type, decimal price)
    this.ProductId = id;
    this.ProductName = name;

change the font color according to the column



i have a column in the list which has values 1.Added



i want to make the field values Killed to be make it as Red so i tried in sharepoint designer converting to xslt data view then did formatting but the problem is i am not able to see the edit in data sheet option. can you please is there any way i can have both to be working? or is there any alternate solution for formatting column based on values

thank you so much.



Crystal Reports in ASP.NET


I have been trying from the past two weeks to integrate crystal reports into my web application. The problem is "We created some reports using Crystal Reports 2008(Sp2) and we are trying to integrate those reports into webpage. Everything works fine on my local machine but when it is deployed to the production server i ran into a lot of problems..

Problem-1 : First time I load the report it comes to the screen where it prompts for DB  credentials and stucks up there..I mean those are non editable and doesn't go to next screen. On my local machine the report even didn't prompt for DB credentials. Why it prompts when moved to prod'n Box? How to avoid that?

Problem-2: How about the images on parameters screen?


Can somebody please help me out with this issue..Can some body have the code for doing all these stuff

ASP.NET MVC2 -- Linq to sql -- Crystal Reports



I need to generate almost 73 reports using Crystal reports using SQL SERVER. I might get more data from XML so opted ASP.NET MVC2.

I have 2 questions:

1) I have a lot of tables to generate Data Context around 35 ( I was thinking to write more stored procedures). Any help with that?

2) Is it possible to create one Report viewer/Crystal report  to display these reports ( I just need to  Read data by querying on input No CRUD operations)

If somebody can explain me the best process to use. Thanks in Advance. 

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