 |

|
Nice work,
I've been using for some years, CR on vs2005 changed at runtime to show or hide columns, change size and font of fields. But instead using parameters, I use formulas.
|
|
|
|

|
Thanks for this article.
In this article you have discussed about adding columns(paramField.Name = "col" + columnNo.ToString()) .
My question is i want to know how to add "rows" to the report.
In other words, i want to display the search results of 5 different employees(empid is different) from the same table into the same report page.
As i am new to sql and crystal report. I dont have any clues about it.
Thanks in advance.
|
|
|
|

|
Hi...I Did The Same Project But For Me "Enter parameter values" Dialog Box Is Showing And Asking For Parameter Values And After I Gave The Values...It Is Showing The Values That I Entered,But Not Showing The Data Retrieving From The Database...Please Help Me..Thanking You
|
|
|
|

|
Thanku
|
|
|
|

|
hi friend..actually i developing a web application,in that application i placed one gridview control and i displayed all the database values in that gridview...in that gridview i provide an option like print,if i click the print link for the particular record ,the selected record will be displayed in the crystal report.....can u explain me how to do this....
|
|
|
|
|

|
in this sample, width of the columns are fixed. this isn't good enough. It'd be better if column width could be dynamically adjusted according to the contents of the column.
|
|
|
|

|
which is not the point of the article.
"My opinion is not represented by my hometown."
|
|
|
|
|

|
Hi,
I have a question about crystal report in visual studio 2008. I use object crystal report viewer for show my report:
crystalReportViewer.ReportSource = reportDocument;
crystalReportViewer.ParameterFieldInfo = report.ParameterFields;
crystalReportViewer.Refresh();
When I change parameter of report on user interface , memory of program is increase about 3-5 MB. How can I clean old data before change parameter ? I don't know where is data of report. Thanks so much!
|
|
|
|

|
Good afternoon sir, I m Dinesh.. i m creating a project in ADO.NET with SQL server 2005 as a back end.. i have a question that after deploying my project for installation on OTHER machine..will my program give me error if destination machine server name does not match with my server name which i have used in my application..?? i used this code: Data Source=Dinesh; Initial Catalog=college_Management_System; User ID=sa; Password=*****;
plz reply me sir soon... Dinesh92
|
|
|
|

|
it is a good article but i want this same thing that take data from multiple tables,i dont know how to query for this case???
|
|
|
|
|

|
Nice article
|
|
|
|

|
Thx~~~ Save a lot of time
|
|
|
|

|
Thanks this is Really working code
|
|
|
|

|
wonderful demonstration on the subject...
Thank you
|
|
|
|

|
Really a heartful of thanks ..
very good tutorial...
|
|
|
|

|
Here you have created all columns in the Crystal report and according to the query it is showing up.But without specifying all columns (For more than 20 columns) how to code it?
|
|
|
|

|
i am making desktop application using C#.Net and Sql SERVER 2008.I want to make crystal reports after seen your this article i am able to create crystal report...how u wrote in article i did same but when i select the checkbox for report i am getting error "incorrect parameter".i have created a table called Media_Method with fields(Media_method_ID,Media_Name,Target_Audience).Parameter fields after adding crystal report is id,name,target respectively .I have tried follwing code
private string CreateSelectQueryAndParameters()
{
ReportDocument reportDocument;
ParameterFields paramFields;
ParameterField paramField;
ParameterDiscreteValue paramDiscreteValue;
reportDocument = new ReportDocument();
paramFields = new ParameterFields();
string query = "SELECT ";
int columnNo = 0;
if (chbid.Checked)
{
columnNo++;
query = query.Insert(query.Length, "Media_method_ID as Column" +
columnNo.ToString());
paramField = new ParameterField();
paramField.Name = "id" + columnNo.ToString();
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = "Media method ID";
paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
}
if (chbname.Checked)
{
columnNo++;
if (query.Contains("Column"))
{
query = query.Insert(query.Length, ", ");
}
query = query.Insert(query.Length, "Media_Name as Column" +
columnNo.ToString());
paramField = new ParameterField();
paramField.Name = "col" + columnNo.ToString();
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = "Media Name"; paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
}
if (chbtarget.Checked)
{
columnNo++; //To determine Column number
if (query.Contains("Column"))
{
query = query.Insert(query.Length, ", ");
}
query = query.Insert(query.Length, "Target_Audience as Column" +
columnNo.ToString());
paramField = new ParameterField();
paramField.Name = "col" + columnNo.ToString();
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = "Target Audience";
paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
}
//if there is any remaining parameter, assign empty value for that
//parameter.
for (int i = columnNo; i < 5; i++)
{
columnNo++;
paramField = new ParameterField();
paramField.Name = "col" + columnNo.ToString();
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = "";
paramField.CurrentValues.Add(paramDiscreteValue);
//Add the paramField to paramFields
paramFields.Add(paramField);
}
crystalReportViewer1.ParameterFieldInfo = paramFields;
query += " FROM Media_Method";
return query;
}
please check bold content properly
private void button1_Click(object sender, EventArgs e)
{
CrystalReport1 objRpt = new CrystalReport1();
string connString = "Data Source=SW-PC-20;Initial Catalog=PSM;Integrated Security=True";
string query = CreateSelectQueryAndParameters();
if (!query.Contains("Column"))
{
MessageBox.Show("No selection to display!");
return;
}
try
{
SqlConnection Conn = new SqlConnection(connString);
SqlDataAdapter adepter =
new SqlDataAdapter(query, connString);
DataSet1 Ds = new DataSet1();
adepter.Fill(Ds, "Media_Method");
objRpt.SetDataSource(Ds);
crystalReportViewer1.ReportSource = objRpt;
}
catch (SqlException oleEx)
{
MessageBox.Show(oleEx.Message);
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
}
please help me if i am wrong
|
|
|
|

|
Its good, but it can do with improvement. Like referencing more than one table.
|
|
|
|

|
I posted this my problem in topic : http://www.codeproject.com/Questions/159722/Problem-with-crystal-report-layout-dynamic.aspx
Can you help me to resolve it
Thanks and Best regards,
|
|
|
|

|
Thank you! It helps a lot.
|
|
|
|

|
This has really helped me.
I still have the parameter prompt coming up even though the parameters are set.
If I disable the prompt I get this error "Unable to get SI_MACHINECHOICE property value".
I noticed that the OK button on the parameter prompt submits a postback, do you have some insight on why this is happening?
Thanks again
|
|
|
|
|

|
I m trying the same in Vb2008 and sql serbver2008 but its not working. its not bringing the data at all. Could you please hepl me.... Thanks in advance. Mashiul
|
|
|
|

|
This is what I was looking for.....Thank you very much !!! Great....
|
|
|
|

|
i tried to find out solution in many placess but the most simply explained and working i got here
|
|
|
|

|
Please, add some details on the issue of parameters and the code infrastuctural idea
|
|
|
|
|

|
Thank you! It helps a lot.
|
|
|
|

|
sinhalenma kiyannam..., elama kiri aiya.., tks a lot..,
i tried this using a dynamic stored procedure days ago.., but this way s much better..,
tks a lot indeed...,
Amila Kandambi
UCSC
|
|
|
|
|

|
Useless article ..........very poor article dont write this type of poor article
|
|
|
|

|
hi dear manjula
i want to know if it is possible to have dynamic report in asp.net and also if i can ask you for your help in selecting the fields from dropdownlist not from check boxes and also select the table ?in advance i thank you for attention and your great article
|
|
|
|

|
I followed your article and i can display everything but the column names.
How can you display the column names?
thanks.
|
|
|
|
|

|
Hey manjula,
great article, its so easy and work perfectly
done lot of googling after that when i found this article, i tried it n its works
thanks n regards
narendra singh(jtv)
|
|
|
|

|
Hi...I m hemant working as software Eng in mumbai...i search so many sites for the same result but unable to get the same.I got u r application and i use it as refrence i m very happy by getting the result.Keep it up..
|
|
|
|

|
I am getting an exception to run this sample .
LoaderLock was detected
Message: DLL 'C:\arup\Dynamic Crystal Reports\bin\Debug\CrystalDecisions.CrystalReports.Engine.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Please help !!!
|
|
|
|

|
thx for code source it's helpfull
|
|
|
|

|
Hi,
First of all, i would like to thank for a very good article.
I have a question, what if i have a data that has a width larger than the field width i have set during the design time.
How can i adjust the field width.
thanks
|
|
|
|

|
Hi
Its working fine . suppose if selected 2 check boxes("CustomerCode,FirstName) its displays like
CustomerCode FirstName
100 Majula
but i want to display(align) ceneter of the page which columns i have selected like below example
Is it posible at runtime?
Please help me.
Thanks
Murali.
|
|
|
|
|

|
Thank you! Hope you will provide more interesting example like that.
AS84
|
|
|
|

|
Dear All,
In crystal report must I decide on the paper size which I am going to use. Because I want to to have quite a lot of columns so what is the best solution? Thank you.
|
|
|
|

|
Thanks man i was looking all over for such code. i almost gave up on crystal report.
|
|
|
|

|
hi i am using two div in one div the selections(check box) and i another div i used the CrystalReportViewer to display the report.As the report is displayed in click event so the export or print of the report is not working...
|
|
|
|

|
Thanks for sharing. It was very useful to me.
|
|
|
|

|
Article is not complete or entirely accurate.
|
|
|
|
 |