codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
This 42 message thread spans 3 pages:  < <   1   2  [3] > >  
  Re: dynamic crystal report generation  jey at 06:22 on Monday, March 20, 2006
 

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


  Re: dynamic crystal report generation  Dips at 05:39 on Tuesday, March 21, 2006
 

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.



  Re: dynamic crystal report generation  dlmac at 14:22 on Friday, March 24, 2006
 

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

  Re: dynamic crystal report generation  dlmac at 15:28 on Friday, March 24, 2006
 

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

  Re: dynamic crystal report generation  saravananbsn at 16:45 on Tuesday, March 28, 2006
 

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.

  Re: dynamic crystal report generation  ultikrupesh at 17:50 on Monday, April 03, 2006
 

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

  Re: dynamic crystal report generation  rastogi.mahesh at 05:44 on Friday, May 26, 2006
 

Can u Describe in Details With Code


  Re: dynamic crystal report generation  sh_abdullah at 11:04 on Thursday, July 06, 2006
 

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

  Re: dynamic crystal report generation  puneetshadija at 10:49 on Friday, July 07, 2006
 

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.

  Re: dynamic crystal report generation  sh_abdullah at 06:34 on Monday, July 10, 2006
 

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

  Re: dynamic crystal report generation  sh_abdullah at 11:23 on Monday, July 10, 2006
 

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

  Re: dynamic crystal report generation  sovalente at 10:44 on Wednesday, July 12, 2006
 

Maybe this site can start a help...

http://www.codeline.pt.la

This 42 message thread spans 3 pages:  < <   1   2  [3] > >  







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  begginer error
•  Re: Converting VC++6 to VC++8, Wrong Library Files
•  Re: Grep or fgrep ??
•  php on two apache vurtualhost sites
•  Dynamically use a text file
•  Text formatting in Perl
•  Re: dynamic crystal report generation
•  Grep or fgrep ??
•  Grep or fgrep ??


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006