We have an almost empty report, and are using ASP to create this
report at runtime. The report looks like this:
-------------------
(report header)
-------------------
(Pageheader)
-------------------
(detail)
Dynamic database fields example........
*Company* *Address* *postal* *city*
-------------------
(Pagefooter)
-------------------
(report footer)
-------------------
The user chooses the fields they want to see on the report from a ASP webpage. In this example they want to see company, address, portal, city.
What we would like to do now, is to create a http link for example
for the company. This link should be dynamic and not a static http
link. This mean that the parameter should change for each row.
We have an almost empty report, and are using ASP to create this
report at runtime. The report looks like this:
-------------------
(report header)
-------------------
(Pageheader)
-------------------
(detail)
Dynamic database fields example........
*Company* *Address* *postal* *city*
-------------------
(Pagefooter)
-------------------
(report footer)
-------------------
The user chooses the fields they want to see on the report from a ASP webpage. In this example they want to see company, address, portal, city.
What we would like to do now, is to create a http link for example
for the company. This link should be dynamic and not a static http
link. This mean that the parameter should change for each row.
For instance (the above example):
Company Microsoft Microsoft Road 8000 San Francisco
Company Dell Dellroad 29 8100 Los Angeles
Company Carlsberg Milkroad 9 8200 Beertown
When i click on the company field i would like to send 2 parameter
to the http page. For instance it would redirect me to:
for Company Microsoft:
Microsoft&postal=8000
for Company Dell:
Dell&postal=8100
----------------------------------------
For each field i put on the form dynamically, i do the following:
Set NewReportObject = ObjectFactory.CreateObject("CrystalReports.FieldObject"
With NewReportObject
.Kind = FieldToAdd.Kind
.FieldValueType = FieldToAdd.Type
.DataSource = FieldToAdd.FormulaForm
.Left = left_start
.width = field_size
.format.EnableCanGrow = true
End With
Set SectionToAddTo = session("egbolig_oClientDoc"
.ReportDefinition.DetailArea.Sections.Item(0)
session("egbolig_oClientDoc"
.ReportDefController.ReportObjectController.Add NewReportObject, SectionToAddTo
--------------------------------------
What i have tried to do to insert the dynamic http link is this:
NewReportObject.Format.HyperlinkType = crHyperlinkTypeWebsite
NewReportObject.Format.HyperlinkText = "
This will NOT work. this will not insert the correct company name with {company.name}. It will be static so it will redirect me to:
I have also tried to make a conditional formula field with the
following 2 lines:
With NewReportObject.Format.ConditionFormulas.Formula(crObjectFormatConditionFormulaTypeHyperlink)
.Syntax = crFormulaSyntaxBasic
.Text = "{company.name}"
End With
This does not work either. See ERROR MSG 1 AND 2 ....
Cause .Text would returns boolean!....
How do we solve this problem?? What is the right appoach to this..
Is it a bug or something missing in the API?...
If you could provide me with a code example..????
Please write as soon as possible!
report at runtime. The report looks like this:
-------------------
(report header)
-------------------
(Pageheader)
-------------------
(detail)
Dynamic database fields example........
*Company* *Address* *postal* *city*
-------------------
(Pagefooter)
-------------------
(report footer)
-------------------
The user chooses the fields they want to see on the report from a ASP webpage. In this example they want to see company, address, portal, city.
What we would like to do now, is to create a http link for example
for the company. This link should be dynamic and not a static http
link. This mean that the parameter should change for each row.
We have an almost empty report, and are using ASP to create this
report at runtime. The report looks like this:
-------------------
(report header)
-------------------
(Pageheader)
-------------------
(detail)
Dynamic database fields example........
*Company* *Address* *postal* *city*
-------------------
(Pagefooter)
-------------------
(report footer)
-------------------
The user chooses the fields they want to see on the report from a ASP webpage. In this example they want to see company, address, portal, city.
What we would like to do now, is to create a http link for example
for the company. This link should be dynamic and not a static http
link. This mean that the parameter should change for each row.
For instance (the above example):
Company Microsoft Microsoft Road 8000 San Francisco
Company Dell Dellroad 29 8100 Los Angeles
Company Carlsberg Milkroad 9 8200 Beertown
When i click on the company field i would like to send 2 parameter
to the http page. For instance it would redirect me to:
for Company Microsoft:
Microsoft&postal=8000
for Company Dell:
Dell&postal=8100
----------------------------------------
For each field i put on the form dynamically, i do the following:
Set NewReportObject = ObjectFactory.CreateObject("CrystalReports.FieldObject"
With NewReportObject
.Kind = FieldToAdd.Kind
.FieldValueType = FieldToAdd.Type
.DataSource = FieldToAdd.FormulaForm
.Left = left_start
.width = field_size
.format.EnableCanGrow = true
End With
Set SectionToAddTo = session("egbolig_oClientDoc"
session("egbolig_oClientDoc"
--------------------------------------
What i have tried to do to insert the dynamic http link is this:
NewReportObject.Format.HyperlinkType = crHyperlinkTypeWebsite
NewReportObject.Format.HyperlinkText = "
This will NOT work. this will not insert the correct company name with {company.name}. It will be static so it will redirect me to:
I have also tried to make a conditional formula field with the
following 2 lines:
With NewReportObject.Format.ConditionFormulas.Formula(crObjectFormatConditionFormulaTypeHyperlink)
.Syntax = crFormulaSyntaxBasic
.Text = "{company.name}"
End With
This does not work either. See ERROR MSG 1 AND 2 ....
Cause .Text would returns boolean!....
How do we solve this problem?? What is the right appoach to this..
Is it a bug or something missing in the API?...
If you could provide me with a code example..????
Please write as soon as possible!