|
This 42 message thread spans 3 pages: < < 1 2 [3] > >
|
|
Hi Dipali,
Yah it is possible:
Please refer the following URL: http://aspalliance.com/459
If you need more help don't hesitate to ask.
Thanks,
Jey
|
|
|
Hi Jey,
Thanks! I read that link and found the intension of the article is "allowing the dynamic generation of parameter input form objects". They are not creating any report at run-time. They have ready reports with them and depending upon the user input some parameters related statistics is done. What I am looking for is: There will be only 1 blank report. To this blank report I will specify all the report columns at runtime. Criteria for the data fetching and filteration, sorting, grouping condition everything in the query at runtime. At runtime report's design also should be created...
So, I was asking is this possible by using any version of Crystal reports or any other reporting tool? If you have any info. abt. it then pls. let me know.
Thanks & Regards,
Dipali.
|
|
|
I am looking for the exactly same thing basically. My need is the PDF function of Crystal. Many of my pages us a GridView and i want to have the result exported to PDF using the built in Crystal export method but I have found the only way to do this is to first create a .rpt file. This is the closest forum i have found to answering my question but it is still not exactly what you want to I want. If i find anything ill let you know, please do the same if you come across anything.
If anyone else has any ideas to get a GridView to PDF let me know. Thanks.
Dan
|
|
|
Hey,
I know this is not what you are looking for but it might give you an idea what can be done. It looks to me, from this artical, that dynamically setting columns for a report is next to imposible unless perhapse you use a formula field? I need to look into it more.
http://aspalliance.com/776
This allows a ds to be passed Dynamically basically data is send depending what data is selected by a user. It does not allow for different columns.
Dan
|
|
|
hi swapna,
i can't get ur statment ur given in this site.
Ur doing any project inthe crystal report through dynamic report creation and report validation. for getting more details contact my mail Id.
|
|
|
i build project in visual basic 6.0 and use Crystal report 9.0 but dynamic report do not build please problem of my question reply wiht my mail
|
|
|
Can u Describe in Details With Code
|
|
|
Illama's solution has workd perfectly...thumbs up...thx illama...if i had nt seen ur post i guess i wud b unable to do dis...bt now i've got it juss in a day
everybody who wants to generate dynamic reports try dis solution
bleive me...formulafeilds are de perfect solution...u dun even need ne connection wid de database neider to execut ne query
|
|
|
Hi
I'll be greatful to you if u can really tell me what u did in order to create the report... kindly share the links and code you wrote... so that we can also do the same.
Hoping for a positive responce.
|
|
|
well puneet...its more simple dan v thought of it to be complex
wot u need to do is:
1. create formula feilds in ur report
2. drag n drop dose formula feilds in ur report
3. in ur code play wid dese formula feilds as following
i. in case of text:
for example, i have a formula feild in my report named as "@column1_Title" (Visual Studio implicitly appends '@' in de start of formula feild name)
now on runtime decision i can change its text
e.g.
if(condition1)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " 'Employee ID' ";
else if(condition2)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " 'Student ID' ";
.
.
.
ii. in case of database:
now, e.g., i have a formula field namd as "@column1_Details"
now on runtime decision we can assign it a specific database column
e.g.
if(condition1)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " {Employee.Employee_ID} ";
else if(condition2)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " '{Student.Student_ID} ";
.
.
.
before . is de table name in de database, n after . is de column name in de table
iii. Dynamically selecting records
juss like u do in sql commands, u dynamically bring sum database content into ur prgm, similarly u can bring database content into ur crystal report dynamically
dere is a property ReportDocumentObject.RecordSelectionFormula using which u can play wid de database
e.g. if i want to select only males or females frm my database
if(condition1)
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'male' ";
else
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'female' ";
after defining record selection formula, u can assign databse column to formula feilds
like aftr above code
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " '{Student.Student_ID} ";
e.g.
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'female' and {Student.Department = 'Computer Engineering'}";
and so on..............
da idea is dat: keep sum title feilds, place dem in de page header, day will be titles of de columns, assign dem text in de code dynamically
den have sum more formula feilds, place dem in de details section of crystal report, day will work as column content, assign dem database columns in de code, dynamically
and one more thing, dis help is for dose who hv a lil information abt working on crystal reports...if sum quite beginner is trying to get help frm dis...plz better get sum knowledge abt working on crystal reports, like how to create dem, use dem n display dem...den dis post will really help u
AND I NEED TO MAKE A CLARIFICATION HERE DAT
YOU DO NEED DATABASE CONNECTIVITY(BUT NOT IN UR CODE, BT IN UR CRYSTAL REPORT)...I APOLOGIZE IF SUMBODY WAS MISLEAD OF DAT STATEMENT OF MINE
n lastly puneet!...u r a VB prgmr...n i know nothing abt VB...so all of above code is in C#...n i dun think dat dere wub b much difference...i guess it wud help u:)
if u succeed in doing dat do lemme know...i still left two things...dynamic db connection and help sources...tell u later...as iv got sum work to do
n dis is open for question...do ask if u hv quiries, confusion or if iv left sumthing ambigious
|
|
|
well puneet...its more simple dan v thought of it to be complex
wot u need to do is:
1. create formula feilds in ur report
2. drag n drop dose formula feilds in ur report
3. in ur code play wid dese formula feilds as following
i. in case of text:
for example, i have a formula feild in my report named as "@column1_Title" (Visual Studio implicitly appends '@' in de start of formula feild name)
now on runtime decision i can change its text
e.g.
if(condition1)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " 'Employee ID' ";
else if(condition2)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " 'Student ID' ";
.
.
.
ii. in case of database:
now, e.g., i have a formula field namd as "@column1_Details"
now on runtime decision we can assign it a specific database column
e.g.
if(condition1)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " {Employee.Employee_ID} ";
else if(condition2)
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " '{Student.Student_ID} ";
.
.
.
before . is de table name in de database, n after . is de column name in de table
iii. Dynamically selecting records
juss like u do in sql commands, u dynamically bring sum database content into ur prgm, similarly u can bring database content into ur crystal report dynamically
dere is a property ReportDocumentObject.RecordSelectionFormula using which u can play wid de database
e.g. if i want to select only males or females frm my database
if(condition1)
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'male' ";
else
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'female' ";
after defining record selection formula, u can assign databse column to formula feilds
like aftr above code
ReportDocumentObject.DataDefinition.FormulaFeilds["column1_title"].Text = " '{Student.Student_ID} ";
e.g.
ReportDocumentObject.RecordSelectionFormula = " {Student.Gender} = 'female' and {Student.Department = 'Computer Engineering'}";
and so on..............
da idea is dat: keep sum title feilds, place dem in de page header, day will be titles of de columns, assign dem text in de code dynamically
den have sum more formula feilds, place dem in de details section of crystal report, day will work as column content, assign dem database columns in de code, dynamically
and one more thing, dis help is for dose who hv a lil information abt working on crystal reports...if sum quite beginner is trying to get help frm dis...plz better get sum knowledge abt working on crystal reports, like how to create dem, use dem n display dem...den dis post will really help u
AND I NEED TO MAKE A CLARIFICATION HERE DAT
YOU DO NEED DATABASE CONNECTIVITY(BUT NOT IN UR CODE, BT IN UR CRYSTAL REPORT)...I APOLOGIZE IF SUMBODY WAS MISLEAD OF DAT STATEMENT OF MINE
n lastly puneet!...u r a VB prgmr...n i know nothing abt VB...so all of above code is in C#...n i dun think dat dere wub b much difference...i guess it wud help u:)
if u succeed in doing dat do lemme know...i still left two things...dynamic db connection and help sources...tell u later...as iv got sum work to do
n dis is open for question...do ask if u hv quiries, confusion or if iv left sumthing ambigious
|
|
|
|
This 42 message thread spans 3 pages: < < 1 2 [3] > > |
|
|
|
|
|