|
|
Hii Dipali
I have also same problem as u for generate a crystal report dyanamically ...
i want to generate a marksheet accroding to the exam for the particular class so subject offered is different from the particular class .. now the problem is that how can i generate a columns for that particular subject which in the datatable dynamically.... have any Idea|???
plz reply me and thanks in advance...
anybody idea about this ??
|
|
|
|
Hi, i am a newbie in C# programming and ASP.net. I am going to call an external Crystal Report to my page. I was able to load it to my page already but i doesn't filter... Please help! tnx!
|
|
|
|
Hi,
Can you please help me out here.
I need to display some columns which are part of the table and some which are not.
For eg. From backend i am getting columns(in fact, table) like call_Date, sum(p1calls) as "call_total". and i am taking it in the dataset.
i could display "call_date" by just dragging that table column on the report. Now i need to display "call_total" which is not actually a database table column but that is sum(p1calls)(This is not a single value but there is a value in each of the rows).
So, Can you please tell me how to display this column on report.
Thanks & Regards,
Prash
<Added>
Hi,
Can someone please help me out here.
I need to display some columns which are part of the table and some which are not.
For eg. From backend i am getting columns(in fact, table) like call_Date, sum(p1calls) as "call_total". and i am taking it in the dataset.
i could display "call_date" by just dragging that table column on the report. Now i need to display "call_total" which is not actually a database table column but that is sum(p1calls)(This is not a single value but there is a value in each of the rows).
So, Can someone please tell me how to display this column on report.
Thanks & Regards,
Prash
|
|
|
|
hi
now its been quite long time i workd on crystal reports
ven u associate a feild in crystal report with a db column, there u'l find an option to associate feild witg .net project object. associate that feild with a dataset and pull data frm db via query into dat dataset.
i hope it will help u
|
|
|
|
Hi Dipali,
Have you (or any other person) found the solution to designing a crystal report in run-time? My problem is the following: "I can't know at design-time the number or names of columns that I want to include in the report, so I need to design the report at run-time". Have someone found the solution to this problem?
Thanks a lot
|
|
|
|
i had the same problem, the only solution is 'Formula Feilds'. Formula feilds are the solution to dynamic content i.e. u decide at runtime, programmatically, the content of formula feilds and also their locatoins. Now, wot u need to do a trick n dat is:
for example, u'll have max 5 feilds in crystal reports bt sometimes u'll have 2 columns and sometimes 3. Define 5 f.feilds and in case of 2 columns u'll assign query results to 2 feilds and other 3 will be left neglected and same is the case ven u hv 3 columns and u use all of 5 feilds in case of 5 columns in report.
and the way to use formula feild, read this topic frm the start, n u'll learn it
|
|
|
|
I am working on an item tracking application and want to create various reports based on user input. I want the user to be able to select the columns they want from a checked listbox and want them to be able to select whether they want a total (for various costs), graphs etc.
I'm writing in c# 2005 with crystal reports XI r2
Thanks for any advice,
Alan
<Added>
EDIT: also, i'm linking to an SQL server 2005 database
|
|
|
|
I have gone through the whole of this article. There are many contributors whose problem I share, but whose solution is still not found.
A contributor called 'me_pinakin' (page 4 13-Sep-2006) explained the problem very well. You want a report that you will use to create a marks sheet for different classes. Each class has different subjects. Number of classes varies from class to class. What to do?
If the Dataset is created at design time, then only those columns (subjectnames) existing then will be known. You get an error "this field name is not known". So, still a problem. any more ideas?
|
|
|
|
|
|
|
|
Hello Sparco,
Actually I saw this site too sometime back. But like i have said above, sometimes you do not know the names or number of columns you have at runtime. So trying to use a statement like " ...if {?Month1}= "JAN" then {DB.JAN} ..." will not work if by the time you are creating the report, JAN is not an existing field.
|
|
|
|
I am using crystal reports (XI) in VB 6.0 and I want to generate a dynamic report at runtime, so that the select columns and tables are not defined at designtime but in runtime user will specifies the comlumns, tables and number of columns and tables are specified, How can I build a crystal report file at runtime with the tables and columns which user specified at runtime? and then show to user?
I am looking forward to hearing from you
|
|
|
|
i have followed the link given by sparco. But i m getting an error.
I have, for eg., max 3 columns. NAME, ADDRESS, CALLNO. But whenever i select 1 or 2 ( but not all 3) columns, i am getting an error.. (even if i select NAME)
************************
'if {?field1} = "NAME" then {CALL_CONSOL.NAS_NAME} '
This field name is not known.
**************************
CALL_CONSOLE is name of my table. Of course, column is not getting suppressed..
I am in urgent need. Any help will be appreciated.
Thanks a lot in anticipation.
--Prash..
|
|
|
|
he he.. here i got the solution.
1)Decide maximum no of columns you want to display in crystal report
2)Crete those many formula fields and parameter fields.
3)Drag those formula fields in Details section of the report one by one.
4) Drag paramter fields in Page header section of the report, one by one, one paramter fields for each (1) formula field header. Parameter field should overlap formula field header.
now write the code in CS file.
ParameterDiscreteValue pvalue = new ParameterDiscreteValue();
int i;
for (i = 0; i < dset.Tables[0].Columns.Count; i++)
{
pvalue.Value = dset.Tables[0].Columns.ColumnName.ToString();
reportDocument.ParameterFields.CurrentValues.Add(pvalue);
reportDocument.DataDefinition.FormulaFields.Text = "{MyTable." + dset.Tables[0].Columns + "}";
}
for (int j = i; j < n; j++)
{
pvalue.Value = "";
reportDocument.ParameterFields[j].CurrentValues.Add(pvalue);
}
'MyTable' is name of the table which contains columns to be displayed. and 'n' is max no of columns..
I hope this helps someone..
Cheers,
Prash..
|
|
|
|
|
|
|
|
Hai All,
I tried dynamic crystal report generation using formula fields it is working fine if i have only one record otherwise it is displaying same record n noof times any body have any idea plz revert me back
Im creating 2 formula fields in my crystal report for displaying empname and salary like this,
abc 100
xyz 200
pqr 300
in code behind im passing values to crystal report like this,
vb.net code
j=0
for i=0 to noof emps
rptDocument.DataDefinition.FormulaFields(j).Text = ds.Tables(0).Rows(i).Item(i)+";"
j=j+1
next
It is printing only
pqr 300
pqr 300
pqr 300
ie, It is over writing every time and im getting only last record how to get all emp records at a time..?
Thanks,
Aswath.
|
|
| This 68 message thread spans 5 pages: < < 1 2 3 [4] 5 > > |