charlieboy
Programmer
Hi,
We are currently writing a .net web form that displays a crystal report. All is working well appart from the hideous Crystal toolbar & group tree. I'm trying to write a replacement for this, but am having no luck.
I've got some code that Microsoft have written to view reports in Microsoft CRM (i'm trying to replicate their report viewer.)
I've got the toolbar in place, but none of the buttons work. Anybody ever changed page number in the web viewer?
If anybody has done this i'd be very gratefull for help & assistance.
Paul
The code i've got is (javascript): This never gets called however becuase the CrystalViewState is undefined.
function CrystalEvent(eventTarget, eventArgument) {
var theform = document.getElementById('CrystalViewerCrystalForm');
theform.CrystalEventTarget.value = eventTarget;
theform.CrystalEventArgument.value = eventArgument;
if (theform.CrystalCompositeViewState.value == "") {
newState = "";
var formCount = document.forms.length;
for (var i = 0; i < formCount; i++)
{
var formName = new String(document.forms.name);
if(formName.indexOf("CrystalForm") != -1){
newState = newState + formName + "="+ document.forms.CrystalViewState.value + ";";document.forms.CrystalViewState.value = ""}
}
theform.CrystalCompositeViewState.value = newState;
}
theform.submit();
}
We are currently writing a .net web form that displays a crystal report. All is working well appart from the hideous Crystal toolbar & group tree. I'm trying to write a replacement for this, but am having no luck.
I've got some code that Microsoft have written to view reports in Microsoft CRM (i'm trying to replicate their report viewer.)
I've got the toolbar in place, but none of the buttons work. Anybody ever changed page number in the web viewer?
If anybody has done this i'd be very gratefull for help & assistance.
Paul
The code i've got is (javascript): This never gets called however becuase the CrystalViewState is undefined.
function CrystalEvent(eventTarget, eventArgument) {
var theform = document.getElementById('CrystalViewerCrystalForm');
theform.CrystalEventTarget.value = eventTarget;
theform.CrystalEventArgument.value = eventArgument;
if (theform.CrystalCompositeViewState.value == "") {
newState = "";
var formCount = document.forms.length;
for (var i = 0; i < formCount; i++)
{
var formName = new String(document.forms.name);
if(formName.indexOf("CrystalForm") != -1){
newState = newState + formName + "="+ document.forms.CrystalViewState.value + ";";document.forms.CrystalViewState.value = ""}
}
theform.CrystalCompositeViewState.value = newState;
}
theform.submit();
}