Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacement Web Viewer Toolbar

Status
Not open for further replies.

charlieboy

Programmer
Mar 4, 2002
11
0
0
GB
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();
}
 
Hi, I'm looking for Total Page number and Current Page number myself.. let me know if you find anything.
To navigate through pages, use:
CrystalReportViewer1.ShowLastPage();

Also, from one of the examples:
// When using ReportClientDocument, you cannot follow the ASP.NET model
// of doing "if ( ! IsPostBack ) CrystalReportViewer.DataBind" in
// Page_Load()/OnLoad(), because we aren't able to persist the object
// into view state. Therefore, you need to databind or set
// CrystalReportViewer.ReportSource in Page_Init().
 
Hi,

I've contacted Crystal about getting the current page object and it seems like there is no way of getting it. There is an enhancement request submitted (from back in January i think -- its on the BusinessObjects web site.)

The closed i've come is by plugging in to the CrystalViewer.Navigate event and by getting the e.NewPageNumber argument.

However, a search for text doesn't fire off the Navigate command.

Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top